2009年5月19日 星期二

Some Adjustments of Lighttpd and PureFTPD for Virtual Hosting on Arch Linux

1. vi /etc/lighttpd/lighttpd.conf

..
server.modules = (
"mod_simple_vhost" )
..
simple-vhost.server-root = "/srv/http/vhosts/"
simple-vhost.default-host = "default"
simple-vhost.document-root = "/"
..

default means read from server.document-root

2. create necessary directories and change the permissions

mkdir -p /srv/http/vhosts/example.com/

chown user:group /srv/http/vhosts/example.com/

3. if your pure-ftpd is set as ChrootEveryone yes, but your client receive 550 error while connecting soft-linked directory

CWD name
550 Can't change directory to name: No such file or director

it means the pure-ftpd wasn't configured with --with-virtual-chroot

4. the solution is to make use of filesystem trick, mount command

mount -o bind /source /destination