Re: apache2 and virtual hosts
On Sat, May 25, 2013 at 4:48 AM, Pol Hallen <deben@fuckaround.org> wrote:
> apache 2.2.16-6+squeeze11
>
> cat /etc/apache2/site-enabled/001-default:
>
> <VirtualHost *:80>
> ServerName domain1.com
> DocumentRoot /var/www/
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
> </VirtualHost>
>
> cat /etc/apache2/site-enabled/domain2
>
> <VirtualHost *:80>
> ServerName domain2.com
> ServerAlias www.domain2.com
> # Indexes + Directory Root.
> #DirectoryIndex index.html
> DocumentRoot /home/domain2/domain2/htdocs/
> </VirtualHost>
Try defining the directories as in the top VirtualHost stanza. I
believe just defining the DocumentRoot is not enough. Apache needs to
know what it can due there. Also, make sure that the www-data user has
reading permission of the directory in /home/domain2/domain2/htdocs/.
Or at least the directory is system readable.
KC9EYE
Reply to: