Friday, January 28, 2011

Change Apache DocumentDirectory path in trueCrypt partition

Hello, I'm recently moving from windows to linux, so I've setup my machine to dual boot Windows7 and Ubuntu 10.04. I was able to successfully setup Apache on the Ubuntu partition, but I need to move the DocumentRoot since my websites are on a TrueCrypt partition that is in another hard drive so I can have them accessible in both OS. I followed some guides on how to change the path for the DocumentRoot so I end up modifiying the default file at /etc/apache2/sites-available

DocumentRoot /media/truecrypt1/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /media/truecrypt1/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Those are the lines that I've changed, but now when I go to localhost I always get the Forbidden You don't have permission to access / on this server. Apache/2.2.14 (Ubuntu) Server at localhost Port 80

  • Probably the permissions on /media/truecrypt/www are not set to where the user/group Apache runs as (likely www-data:www-data) can get to them. Use chown to set at least the group to www-data on /media/truecrypt/www recursively, and make sure it's chmod 750, or 770 if you have cgi or other scripts that need write access to that directory.

    Don't use chmod 755 or 775 (and definitely NOT 777) on /media/truecrypt/www because you likely don't want processes other than Apache as www-data:www-data accessing your Truecrypted files

0 comments:

Post a Comment