Hi,
I have a problem with apache, it gives a 403 forbidden message for every file and directory in my document root. I also setup the userdir module and in userdirs everything works fine. I have searched on the web for days now and I still haven't found the answer.
My documentroot is set to /var/www/htdocs/ and as far as I can see everything is fine:
Code:
drwxrwxr-- 2 root apache 144 2008-02-14 22:38 cgi-bin/
drwxrwxr-- 3 root apache 976 2008-02-14 22:38 error/
drwxr-xr-x 32 apache apache 1144 2008-09-07 16:46 htdocs/
drwxrwxr-- 3 root apache 4632 2008-02-14 22:38 icons/
the rights for htdocs are recursive. I also tried changing it to 777, but still no effect.
The apache access logs gives a bunch of these lines:
Code:
local.damnation.nl - - [07/Sep/2008:17:02:29 +0200] "GET / HTTP/1.1" 403 293
And my error_log
Code:
[Sun Sep 07 17:02:34 2008] [crit] [client 10.0.0.150] (13)Permission denied: /var/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun Sep 07 17:02:37 2008] [crit] [client 10.0.0.150] (13)Permission denied: /var/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
These errors come from a .htaccess file, they only appear when I enter a directory with a .htaccess file in it. I didn't took the time yet to set it up right. There aren't anymore errors then these.
In my Apache config I have the following lines (if there is more info about my config needed just ask):
Code:
<Directory "/var/www/htdocs/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options All
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
Userdirs:
Code:
UserDir public_html
<Directory "/home/*/public_html">
AllowOverride All
Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
And also a couple of vhosts like these (there are more of them in the original config):
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName home.habl.nl
ServerAlias *.home.habl.nl
DocumentRoot /var/www/htdocs/images/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
For what I know it should work with this config and I tried a dozen of other combinations.
I really have no idea what to do anymore, probably it's something really simple and stupid, but I can't see my mistake. Somebody here who do?