You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by j k <jo...@gmail.com> on 2007/06/09 15:58:13 UTC
[users@httpd] error doc handler ok for 403 but fails on 404
I followed this suggestion in the apache2 htpd.conf to use the default error
handlers:
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation. To activate them, uncomment the following 30 lines.
and it works fine for a 403 i get the expected response:
Access forbidden!
You don't have permission to access the requested directory. There is either
no index document or the directory is read-protected.
Error 403
myserver
Sat Jun 9 13:48:46 2007
Apache
But when I access a non-existant file
http://myserver/nof.html
it brings back an odd message with an exra not found in it:
Not Found
The requested URL /nof.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
------------------------------
Apache Server at myserver Port 80
and when I look in the logs it seems to be looking in the wrong place for
the error doc:
[Sat Jun 09 13:32:32 2007] [error] [client 74.6.26.136] File does not exist:
/var/www/localhost/htdocs/error.html
What might I have done wrong that has messed up what should be a plain
vanila default setup?
Thanks.
Re: [users@httpd] error doc handler ok for 403 but fails on 404
Posted by j k <jo...@gmail.com>.
On 6/9/07, Joshua Slive <jo...@slive.ca> wrote:
>
> On 6/9/07, j k <jo...@gmail.com> wrote:
>
> > The requested URL /nof.html was not found on this server.
> >
> > Additionally, a 404 Not Found error was encountered while trying to use
> an
> > ErrorDocument to handle the request. ________________________________
> > Apache Server at myserver Port 80
> > and when I look in the logs it seems to be looking in the wrong place
> for
> > the error doc:
> > [Sat Jun 09 13:32:32 2007] [error] [client 74.6.26.136] File does not
> exist:
> > /var/www/localhost/htdocs/error.html
> >
> > What might I have done wrong that has messed up what should be a plain
> > vanila default setup?
>
> Somewhere in httpd.conf, or an Include'd .conf file or .htaccess file
> you have something that looks like:
> ErrorDocument 404 /error.html
> This is certainly not in the default configs, so it must have been
> something added locally.
>
> Joshua.
How right you are.
I did
grep -r ErrorDocument *
from /etc/apache2/
and found a whole bunch of vestigal entries from copying over the vhosts
files from the previous server. oops
Thanks Joshua :)
Jonny
Re: [users@httpd] error doc handler ok for 403 but fails on 404
Posted by Joshua Slive <jo...@slive.ca>.
On 6/9/07, j k <jo...@gmail.com> wrote:
> The requested URL /nof.html was not found on this server.
>
> Additionally, a 404 Not Found error was encountered while trying to use an
> ErrorDocument to handle the request. ________________________________
> Apache Server at myserver Port 80
> and when I look in the logs it seems to be looking in the wrong place for
> the error doc:
> [Sat Jun 09 13:32:32 2007] [error] [client 74.6.26.136] File does not exist:
> /var/www/localhost/htdocs/error.html
>
> What might I have done wrong that has messed up what should be a plain
> vanila default setup?
Somewhere in httpd.conf, or an Include'd .conf file or .htaccess file
you have something that looks like:
ErrorDocument 404 /error.html
This is certainly not in the default configs, so it must have been
something added locally.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org