403 problem: OpenSuse 11 with Apache 2.2
Hi!
I am new to this Forum and new to Linux, and am enjoying the superb performance of this OS. I have installed all packages needed for a LAMP server and configured the settings for Apache as far as I know how, but I still get a 403 when trying to access ANYTHING on the server, except http://server/manual, which gives me the Apache Manual. /etc/apache2/httpd.conf : Code:
Include /etc/apache2/uid.conf Code:
DocumentRoot /srv/www/htdocs Code:
APACHE_CONF_INCLUDE_FILES="" |
Hi and welcome to LQ
Check the apache error.log to see why you get this error. Make sure you have an index.html in /srv/www/htdocs and also that this directory has the execute bit on: Code:
chmod +x /srv/www/htdocs |
'index.php' exists, and should work because:
Code:
DirectoryIndex index.php index.html index.html.var Code:
chmod +x -v /srv/www/htdocs But still the problem persists. Here are the logs: error_log Code:
[Mon Jul 14 10:11:58 2008] [crit] [client 10.0.0.10] (13)Permission denied: /srv/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable Code:
10.0.0.10 - - [14/Jul/2008:10:11:58 +0200] "GET / HTTP/1.1" 403 1033 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1" Regards |
No, you don't need it (unless you do). It sounds like the file may exist in that location -- check with:
Code:
# file /srv/www/.htaccess ------- Failing that, try changing your directive to the following: Code:
AccessFileName .foomyfoo |
Quote:
Code:
# chmod u+rwx,g+rx-w,o-rwx filename Code:
$ man chmod |
This:
Code:
cd /srv/www Code:
file /srv/www/htdocs/.htaccess I removed the AccessFileName directive, and restarted Apache ... no difference. I changed the directive to: Code:
AccessFileName .foobar The error-log now states: Code:
[Tue Jul 15 04:08:56 2008] [crit] [client 10.0.0.10] (13)Permission denied: /srv/www/.foobar pcfg_openfile: unable to check htaccess file, ensure it is readable Code:
chmod 775 -v /srv/www/.foobar The exact same error message appears in error_log when trying to load the page. BTW: Quote:
|
Something definitely seems screwy. OTOH, you have a lot of Includes in place, and we're not sure what those configs are doing.
Next round: Code:
#AccessFileName .htaccess The AccessFileName default will be .htaccess anyway, but I'm curious to see what happens. ------- I thought of one more thing. Add this to your Directory '/' config: Code:
<Directory /> |
One more thing: you say requests to http//your.host/manual work. So what is in:
Code:
Include /etc/apache2/conf.d/apache2-manual?conf |
All the include statements came with the Apache installation. I just removed all comments for readability. The only other document containing the <Document> tag is default-server.conf (available in my first post), as far as I know.
Commenting out the <files> part does nothing different, same error_log output. (The comment above that part said that it only prevents people from accessing those files through the website). Using: Code:
AllowOverride None Code:
[Tue Jul 15 08:36:02 2008] [error] [client 10.0.0.10] (13)Permission denied: access to / denied Looking at apache2-manual.conf: Code:
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/apache2/manual$1" Bottom line: still not working. |
Sorry this is taking so long, but frankly the config supplied by your distro is a mess. (Just my grouchy opinion.)
Here's one for you: do you have an index.html file in your DocumentRoot (/srv/www/htdocs)?? |
Try:
Code:
chown -R wwwrun:users /srv/www Quote:
Check those *.conf files to see if there is another definition of DocumentRoot to be /srv/www. |
Quote:
Quote:
|
@anomie
Quote:
Regards |
Quote:
Quote:
I cannot find another definitions of DocumentRoot, so I still have the problem. |
apache is not running as root in most cases. It starts with root privileges so it can bind on port 80 and then drops to the user/group defined by the respective directives (User and Group). Reading Suse documentation for apache, it looks like it run as wwwrun/users, so make sure that the whole /srv/www path is owned and readable/executable by that user/group.
|
All times are GMT -5. The time now is 06:53 AM. |