Add werc.cat-v.org/ site, it serves as sample site.

This commit is contained in:
Uriel 2009-01-20 03:52:21 +01:00
parent 9f1f4ca37f
commit 79357e5c5a
11 changed files with 240 additions and 0 deletions

View file

@ -0,0 +1,56 @@
Nhttpd config for werc
======================
Contributed by nsz, thanks!
The last two sections are relevant: aliases (to make non-content site material,
like css, available) and virtual hosts (the document root is set to `werc.rc`
so it will handle every request).
# MAIN [MANDATORY]
servername main.host.com
serveradmin admin[at]mail.com
serverroot /var/nostromo
servermimes conf/mimes
logpid logs/nhttpd.pid
logaccess logs/access_log
docroot /var/nostromo/htdocs
docindex index.html
# SETUID [RECOMMENDED]
user nhttpd
# BASIC AUTHENTICATION [OPTIONAL]
#...
# SSL [OPTIONAL]
#...
# CUSTOM RESPONSES [OPTIONAL]
#...
# HOMEDIRS [OPTIONAL]
#...
# ALIASES [OPTIONAL]
/pub /path/to/werc/pub
/favicon.ico /path/to/werc/pub/default_favicon.ico
# VIRTUAL HOSTS [OPTIONAL]
vhost1.com /path/to/werc/bin/werc.rc
vhost2.com /path/to/werc/bin/werc.rc
#...
To use werc on `main.host.com` as well just set `docroot` to `/path/to/werc/bin/werc.rc`
and set `docindex` to empty string.
There was a bug in nhttpd <=1.9, it did not set `SERVER_NAME` properly (leaft it `main.host.com`).
To solve this problem just add a
SERVER_NAME=$HTTP_HOST
line somewhere at the top of `werc.rc`.