I'm having an issue getting vhosts to work on Apache 2.2, Debian 6. I have two VirtualHosts, one on port 80 and one on port 8888. The port 80 one has been created automatically by DirectAdmin, the 8888 is a custom one. It's configuration is as follows.
<VirtualHost *:8888 > DocumentRoot /home/user/public_html/development ServerName www.myserver.nl ServerAlias myserver.nl <Directory "/home/user/public_html/development"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Order Allow,deny Allow from all </Directory> </VirtualHost>
Of course I also have a
The port 80 DocumentRoot is
/home/user/public_html/production, which is perfectly accessible and works like a charm. The port 8888 docroot of
/home/user/public_html/development is 403 forbidden though.
I have compared the permissions for both folders. They seem fine to me.
drwxr-xr-x 2 root root 4096 Aug 17 16:14 development drwxr-xr-x 4 root root 4096 Aug 18 04:29 production
Also, the index.php file which is supposed to display when accessing through port 8888, located in /development/:
-rwxr-xr-x 1 root root 41 Aug 17 16:14 index.html
I have looked at my error_log and found many of the following entries, only being added to the log file when accessing through port 8888.
[Sat Aug 18 04:35:09 2012] [error] [client 184.108.40.206] Symbolic link not allowed or link target not accessible: /home/user/public_html
/home/user/public_html is a symbolic link that refers to
/home/user/domains/mydomain/public_html. The symbolic link has the following permissions:
lrwxrwxrwx 1 admin admin 29 Aug 17 15:56 public_html -> ./domains/mydomain/public_html
I'm at a loss. It seems that everything is readable or executable. I've set the Directory to FollowSymLinks in the
httpd.conf file, but that doesn't seem to make a difference. If I change that directory tag to
<Directory "/home/admin/public_html"> (so it has FollowSymLinks on that as well) it still does not work.
Any help is greatly appreciated. If I need to post more information, let me know. I'm pretty much a beginner at this stuff.
UPDATE: I ended up changing the configuration to directly go to the actual path of the files, avoiding the public_html symlink altogether. That worked. Thanks for the suggestions folks.