[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#256510: marked as done (Apache2 .htaccess ErrorDocument)



Your message dated Mon, 17 Mar 2008 23:44:55 +0100
with message-id <200803172344.55517.sf@sfritsch.de>
and subject line Apache2 .htaccess ErrorDocument
has caused the Debian Bug report #256510,
regarding Apache2 .htaccess ErrorDocument
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
256510: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256510
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apache2-mpm-prefork
Severity: normal
Version: 2.0.49-1

Hello,

Bug:
----
Apache2 doesn't handle ErrorDocuments set from a .htaccess file properly.

How:
----
Have a vhost configured and AllowOverrides All for your DocumentRoot.
Next put a .htaccess in your DocumentRoot which has:
    ErrorDocument 404 /error/404.html
Ensure that the relative path to your 404.html really exists :)
Try to reach a nonexistant page.

What:
-----
You'll get a default 404 page telling you Not Found, and that there was
an additional error with the ErrorDocument.

Logs show:
----------
[snip] File does not exist: /var/vhosts/www.freshdot.net/html/aegaeg
[snip] File does not exist: /usr/share/apache2/error/404.html




Okay! So now try:
-----------------
Change the /error/404.html in your .htaccess to:
    ErrorDocument 404 /var/vhosts/www.freshdot.net/html/error/404.html
Ensure that your path really exists :)
Try to reach a nonexistant page.

What:
-----
You'll get a default 404 page telling you Not Found, and that there was
an additional error with the ErrorDocument.

Logs show:
----------
[snip] File does not exist: /var/vhosts/www.freshdot.net/html/aegaeg
[snip] File does not exist: /var/vhosts/www.freshdot.net/html/var

Funny thing:
------------
When you specify:
    ErrorDocument 404 /404.html
(make sure 404.html exists in DocumentRoot :P)
And request a nonexistant page, it nicely displays 404.html.

Conclusion:
-----------
ErrorDocuments set from .htaccess can only reside in DocumentRoot, in
contradiction to ErrorDocuments set from <VirtualHost> config.

Side-note:
----------
When you put in
    ErrorDocument 404 error/404.html

And request a nonexistant page, all you see is 'error/404.html' in
plaintext. IMHO this should only happen when "wrapped in quotes", the
above should be handled as a relative path. But I could be wrong ;)

Then there's still this /htdocs problem that I need to reproduce before
I can bitch & moan about it ;))

Keep up the good work!
Kind regards,
Sander.
-- 
| You will experience a strong urge to do good; but it will pass.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
version: 2.2.3-4

This seems to be fixed in 2.2.x. At least I could not reproduce it.


--- End Message ---

Reply to: