multiuserenv. but global 404 errordocument

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-25-2005
Christian Wagner
 
Posts: n/a
Default multiuserenv. but global 404 errordocument

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


  #2 (permalink)  
Old 06-25-2005
HansH
 
Posts: n/a
Default Re: multiuserenv. but global 404 errordocument

"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


  #3 (permalink)  
Old 06-25-2005
Christian Wagner
 
Posts: n/a
Default Re: multiuserenv. but global 404 errordocument

> Add
> alias /htdocs /srv/www/htdocs
> and change to
>> ErrorDocument 404 /htdocs/test.php

>
> Untested ofcourse ...


Thats works finde, Thank you!

Greetings
Christian


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0