Results 1 to 10 of 11
When I try to access a web page that does not exist on my server I get the following response,
Code:
The requested URL /blah_blah.html was not found on this ...
- 12-04-2006 #1
Not able to view error messages
When I try to access a web page that does not exist on my server I get the following response,
I checked apache's error logs and it says,Code:The requested URL /blah_blah.html was not found on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I've checked the permissions on the error directory and it's owned by the same user I use to run apache, so there shouldn't be a problem with that. Also, I haven't changed the errors.conf file, so I guess it's still correctly configured.Code:(13)Permission denied: access to /error/HTTP_NOT_FOUND.html.var denied
Can anyone tell me what I should change to allow access to the regular apache error messages?
Thanks.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 12-05-2006 #2
Anyone have any ideas?
I'd really appreciate any help at all.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 12-08-2006 #3Linux User
- Join Date
- Jan 2006
- Posts
- 414
The problem is most likely in the errors.conf file, open and check for the lines that say;
Order deny,allow
Deny from all
and change them to;
Order allow,deny
Allow from all
Also check the errors directory permissions are set to 755
- 12-08-2006 #4
Thanks for posting darkrose0510.
I confirmed that the lines in errors.conf in the directory section are correct, and I've just changed the errors directory permissions to 755, but it still doesn't work.
I tried it with the directory owned by root and the apache user, but no luck there either.
Have you any other suggestions?Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 12-09-2006 #5Linux User
- Join Date
- Jan 2006
- Posts
- 414
I take it the actual error files themselves have the right permissions - 644
and that the errors.conf file does actually point to the correct directory;
Alias /error/ "/usr/share/apache2/error/"
or similar.
- 12-09-2006 #6
Thanks for keeping up with this thread, darkrose0510 -- I appreciate your help.
Yes. I've just confirmed they're all 644.
Originally Posted by darkrose0510
The following is the relevant section from errors.conf
Originally Posted by darkrose0510 It all looks right to me. What do you think?Code:Alias /error/ "/usr/share/apache2/error/" <IfModule mod_negotiation.c> <IfModule mod_include.c> <Directory "/usr/share/apache2/error/"> AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr ForceLanguagePriority Prefer Fallback </Directory>
Thanks again for your help.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 12-09-2006 #7Linux User
- Join Date
- Jan 2006
- Posts
- 414
Hmm, have a look in httpd.conf and see if there is a section denying access to the filesystem, somwhere around line 150ish;
Edit the relavent lines to;Code:<Directory /> Options None AllowOverride None Order deny,allow Deny from all </Directory>
and try again...Code:allow, deny Allow from all
if you still have no luck, try commenting out line 145 of httpd.conf just to see if apache is generating it's error messages correctly.
#Include /etc/apache2/errors.conf
Try to access a page that doesn't exist and you should get a basic error page like;
Not Found
The requested URL /blah.html was not found on this server.
Apache/2.2.3 (Linux/SUSE) example.com Port 80
If that is fine then atleast apache is generating errors correctly.
So let us know how you go....
- 12-09-2006 #8
Thanks for all the comments darkrose -- you're a saint!
I changed httpd.conf to "allow,deny" and "Allow from all" with no success.
I then commented out the include line you suggested, and then it worked! So I left it commented out and reset httpd.conf to deny access to /, and it continues to work.So what does this imply? I'm kinda confused since I thought that apache wouldn't generate anything with this line uncommented!Not Found
The requested URL /nonexistingpage.html was not found on this server.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 12-09-2006 #9Linux User
- Join Date
- Jan 2006
- Posts
- 414
With that line commented out Apache will use it's default error messages rather than the error pages Suse want you to use.
What you can try is moving the contents of /usr/share/apache2/error/ to somewhere like /srv/www/error/ then edit errors.conf to point to this directory
Then uncomment the Include line in httpd.conf and you should be using the Suse error messages.Code:Alias /error/ "/srv/www/error/" <IfModule mod_negotiation.c> <IfModule mod_include.c> <Directory "/srv/www/error/"> AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr ForceLanguagePriority Prefer Fallback </Directory>
- 12-09-2006 #10
Thanks again.
I tried your suggestion of moving the error files to a /srv/www/error/ and altering errors.conf and httpd.conf, with no success.
It seems as if there is a config command somewhere that is stopping apache seeing anything outside of its home directory, and therefore cannot see the messages in /srv/www/error. I checked this theory by putting the error folder in the root apache folder (/srv/www/htdocs) and it worked!
I then removed /srv/www/htdocs/error, and made a new </Directory> entry in httpd.conf.local with "order allow,deny" and "allow from all" for /srv/www/error, and this worked. It now allows me to see the error folder in the directory above the web root folder. The annoying thing is that it doesn't work in the original folder no matter what I try!
I'm a bit of a newbie when it comes to web servers, so I was wondering if there any security implications of having the errors folder one folder above the web root?
Thanks again for your help.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode


Reply With Quote