You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Harrell, Roger" <rj...@bechtel.com> on 2004/11/18 23:35:53 UTC

[users@httpd] Error document handling

I've just set up a few new virtual host on my machine with 
  ErrorDocument 404 /errordocs/404.php
in the <virtualhost> directive.

In most cases on this server this is working properly, but for a few new
domains I've added I get a generic 404 response. It's not even the default
404 response for the server. I'm getting the generic browser 404. The
error_log only show's the original request. There's no chain of events type
information to help resolve this. Anyone seen something like this?

Thanks,
Roger

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


Re: [users@httpd] Error document handling

Posted by The Disguised Jedi <di...@gmail.com>.
Be sure that your 404 file includes a status code.

It looks like you are using PHP, so here's a sample...

<?php 
header("HTTP/1.0 404 Not Found"); 
?>

That will tell the clients browser that the file couldn't be found.

Hope it helps,

-- 
The Disguised Jedi
disguised.jedi@gmail.com

PHP rocks!

On Fri, 19 Nov 2004 00:20:12 +0100, Ralf Glauberman
<rg...@michaeli-gymnasium.de> wrote:
> try telnetting into the server on port 80 and do the request this way to see
> what the server does return.
> telnet www.yourdomain.com 80
> GET /nonexistingfile.html HTTP/1.1
> Host: www.yourdomain.com
> 
> 
> 
> 
> ----- Original Message -----
> From: "Harrell, Roger" <rj...@bechtel.com>
> To: <us...@httpd.apache.org>
> Sent: Thursday, November 18, 2004 11:35 PM
> Subject: [users@httpd] Error document handling
> 
> > I've just set up a few new virtual host on my machine with
> >  ErrorDocument 404 /errordocs/404.php
> > in the <virtualhost> directive.
> >
> > In most cases on this server this is working properly, but for a few new
> > domains I've added I get a generic 404 response. It's not even the default
> > 404 response for the server. I'm getting the generic browser 404. The
> > error_log only show's the original request. There's no chain of events
> > type
> > information to help resolve this. Anyone seen something like this?
> >
> > Thanks,
> > Roger
> >
> > ---------------------------------------------------------------------
> > 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
> >
> 
> ---------------------------------------------------------------------
> 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
> 
>

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


Re: [users@httpd] Error document handling

Posted by Ralf Glauberman <rg...@michaeli-gymnasium.de>.
try telnetting into the server on port 80 and do the request this way to see 
what the server does return.
telnet www.yourdomain.com 80
GET /nonexistingfile.html HTTP/1.1
Host: www.yourdomain.com



----- Original Message ----- 
From: "Harrell, Roger" <rj...@bechtel.com>
To: <us...@httpd.apache.org>
Sent: Thursday, November 18, 2004 11:35 PM
Subject: [users@httpd] Error document handling


> I've just set up a few new virtual host on my machine with
>  ErrorDocument 404 /errordocs/404.php
> in the <virtualhost> directive.
>
> In most cases on this server this is working properly, but for a few new
> domains I've added I get a generic 404 response. It's not even the default
> 404 response for the server. I'm getting the generic browser 404. The
> error_log only show's the original request. There's no chain of events 
> type
> information to help resolve this. Anyone seen something like this?
>
> Thanks,
> Roger
>
> ---------------------------------------------------------------------
> 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
> 


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