Saturday, May 08, 2010

Web server's DocumentRoot

Actually this is a old problem for me, i can't set Apache or Lighttpd document root's to a mounted FAT filesystem, i got

DocumentRoot must be a directory

After googling for some pages, i found that SELinux cause this. Then disable SELinux by editing /etc/selinux/config file on Fedora 12, set mounted device with Apache's or Lighttpd's UID and GID.

[root@thinkpad /]# cat /etc/passwd | grep lighttpd
lighttpd:x:491:480:lighttpd web server:/var/www/lighttpd:/sbin/nologin
[root@thinkpad /]# mount -t /dev/the_device_name -t vfat -o rw,nosuid,nodev,uid=491,gid=480 /mount_place


Small changes to appropriate server's configuration, and the web server are ready to be my local repository.