You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Galbayar <ga...@mobicom.mn> on 2002/02/06 05:18:49 UTC

How can I customize the apache 404

 
How can I customize the apache 404


Re: How can I customize the apache 404

Posted by David Cassidy <dc...@hotgen.com>.
of course you could make your 404 page a jsp page
then you could do a search of your site for the object that they were
really after ...

;0

D

Liam Holohan wrote:

> Clay Mitchell wrote:
>
> > http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02d.html
> >
> > -----Original Message-----
> > From: Galbayar [mailto:galbayar@mobicom.mn]
> > Sent: Tuesday, February 05, 2002 11:19 PM
> > To: Tomcat Users List
> > Subject: How can I customize the apache 404
> >
> >
> >
> > How can I customize the apache 404
> >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> Not a difficult problem ...
>
> In apache httpd.conf you can use the "ErrorDocument" directive
>
> I have a number of virtual hosts in a conf file linking off my main
> httpd.conf...
>
> i.e
>
> the last line in httpd.conf is ...
> Include /home/wasp/modules/apache/1.3.22/conf/vhosts.conf
> (this keeps httpd.conf clean and adding a new virtual host means
> ammending vhosts.conf not the main server configuration...
>
> the entry for a virtual host (e.g www.test.com) in vhosts.conf is ...
>
> <VirtualHost 10.20.32.13>
>      ServerAdmin tester@test.com
>      DocumentRoot /home/wasp/vhosts/www.test.com/htdocs
>      ServerName www.test.com
>      TransferLog /home/wasp/vhosts/www.test.com/logs/www.test.com-xferlog
>      ErrorLog /home/wasp/vhosts/www.test.com/logs/www.test.com-errorlog
>
> # these lines are for linking tomcat to apache for serving jsp pages
>      WebAppConnection www.test.com.warpConnection-8009 warp 10.20.32.13:8009
>      WebAppDeploy app-example www.test.com.warpConnection-8009 /app-example
>
> # this is what you have to do for custom error pages etc..
>      ErrorDocument 500 /errors/500.html
>      ErrorDocument 404 /errors/404.html
>      ErrorDocument 401 /errors/401.html
>      ErrorDocument 403 /errors/403.html
> </VirtualHost>
>
> in /home/wasp/vhosts/www.test.com/htdocs create a directory called
> errors and put your custom html files in there and call them 404.html
> 500.html etc...  bounce the server and type in a url for the site that
> you know will generate a 404
>
> hope this helps ...
> Liam :-)
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: How can I customize the apache 404

Posted by Liam Holohan <li...@mail.smartframeworks.com>.
Clay Mitchell wrote:

> http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02d.html
> 
> -----Original Message-----
> From: Galbayar [mailto:galbayar@mobicom.mn] 
> Sent: Tuesday, February 05, 2002 11:19 PM
> To: Tomcat Users List
> Subject: How can I customize the apache 404
> 
> 
>  
> How can I customize the apache 404
> 
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 
Not a difficult problem ...

In apache httpd.conf you can use the "ErrorDocument" directive

I have a number of virtual hosts in a conf file linking off my main 
httpd.conf...

i.e

the last line in httpd.conf is ...
Include /home/wasp/modules/apache/1.3.22/conf/vhosts.conf
(this keeps httpd.conf clean and adding a new virtual host means 
ammending vhosts.conf not the main server configuration...

the entry for a virtual host (e.g www.test.com) in vhosts.conf is ...

<VirtualHost 10.20.32.13>
     ServerAdmin tester@test.com
     DocumentRoot /home/wasp/vhosts/www.test.com/htdocs
     ServerName www.test.com
     TransferLog /home/wasp/vhosts/www.test.com/logs/www.test.com-xferlog
     ErrorLog /home/wasp/vhosts/www.test.com/logs/www.test.com-errorlog

# these lines are for linking tomcat to apache for serving jsp pages
     WebAppConnection www.test.com.warpConnection-8009 warp 10.20.32.13:8009
     WebAppDeploy app-example www.test.com.warpConnection-8009 /app-example

# this is what you have to do for custom error pages etc..
     ErrorDocument 500 /errors/500.html
     ErrorDocument 404 /errors/404.html
     ErrorDocument 401 /errors/401.html
     ErrorDocument 403 /errors/403.html
</VirtualHost>


in /home/wasp/vhosts/www.test.com/htdocs create a directory called 
errors and put your custom html files in there and call them 404.html 
500.html etc...  bounce the server and type in a url for the site that 
you know will generate a 404

hope this helps ...
Liam :-)


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: How can I customize the apache 404

Posted by Clay Mitchell <cl...@pfd.net>.
http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02d.html

-----Original Message-----
From: Galbayar [mailto:galbayar@mobicom.mn] 
Sent: Tuesday, February 05, 2002 11:19 PM
To: Tomcat Users List
Subject: How can I customize the apache 404


 
How can I customize the apache 404



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>