This is a discussion on multiuserenv. but global 404 errordocument within the Apache Web Server forums, part of the Web Server and Related Forums category; hi, my english is bad, so I`ll be quick :) I`m using apache2 + confixx. On my Server are serveral ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi, my english is bad, so I`ll be quick :)
I`m using apache2 + confixx. On my Server are serveral virtual hosts. I want for all virtual hosts a global 404 errordocument without using an external redirect i.e. ErrorDocument 404 http://example.com BUT ErrorDocument 404 /srv/www/htdocs/web12/html/test.php does not work, apache is trying to add the given path to the path of the virtual host where the 404 occurs. i.e. apache searchs the errordocument in /srv/www/htdocs/web12/html/srv/www/htdocs/web12/html/test.php (seen in error_log) I made the changes in an own "special.conf", which is last included in httpd.conf special.conf: <directory "/srv/www/htdocs"> ErrorDocument 404 /srv/www/htdocs/web12/html/test.php #file test.php exists in /srv/www/htdocs/web12/html ! </directory> DocumentRoot is default When i cause a 404 I get: 404 not found, additionally a 404 was found when trying to use an errordocument to handle the request. Greetings, Christian |
|
|||
|
"Christian Wagner" <afubo@t-online.de> schreef in bericht
news:d9i2d2$5j1$03$1@news.t-online.com... > I`m using apache2 + confixx. On my Server are serveral virtual hosts. > I want for all virtual hosts a global 404 errordocument without using an > external redirect i.e. > ErrorDocument 404 http://example.com > BUT > ErrorDocument 404 /srv/www/htdocs/web12/html/test.php > does not work, apache is trying to add the given path to the path of the > virtual host where the 404 occurs. > i.e. apache searchs the errordocument in > /srv/www/htdocs/web12/html/srv/www/htdocs/web12/html/test.php > (seen in error_log) As documented directive can not handle path on file system http://httpd.apache.org/docs-2.0/mod...#errordocument > When i cause a 404 I get: 404 not found, additionally a 404 was found when > trying to use an errordocument to handle the request. Add alias /htdocs /srv/www/htdocs and change to ErrorDocument 404 /htdocs/test.php Untested ofcourse ... Hans |