I'm getting 403 forbidden errors with this virtualhost directory in apache 2.2. Can anyone help, please?
<VirtualHost *:80>
ServerName www.xyz.com
ServerAlias xyz.com
DocumentRoot "/home/bruce/projects/links/www"
<Directory />
AllowOverride None
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html index.htm index.jsp index.php
</VirtualHost>
Thanks!
EDIT error in log is
(13)Permission denied: access to / denied
If i'm not wrong you have indicated the root directory of you file system in < Directory>
It should be:
<VirtualHost *:80>
ServerName www.xyz.com
ServerAlias xyz.com
DocumentRoot "/home/bruce/projects/links/www"
<Directory /home/bruce/projects/links/www>
...
Gah. It ended up being that I was indeed forbidden from accessing that page. I am using a new virtual server provider, and they have set up my /home account as readable only by me. As a result, the user running apache was unable to view the files. I've changed the permissions on my home directory to be more lenient and now everything works as expected.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.