Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I easily customize Apache web server error pages.

I found some localization strings which look like nightmare. I just want to set a nice "server busy" page in one locale whenever mod_proxy cannot connect to sub-server.

What is the easiest way? Copy file where? It's filename is what? Do I need to tweak a config setting?

I am looking for a copy-paste solution instead of documentation.... Now I am getting

"Service Temporarily Unavailable" 

page.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You can customize error page with the ErrorDocument directive, the code you want to customize are probably 504 and 502, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for a full list of possible code.

share|improve this answer
    
Any example code? I am looking for a copy-paste solution instead of documentation.... Now I am getting "Service Temporarily Unavailable" page. Not sure what error code.. not found? Anyways, I can tweak the code later. –  Martin Aug 13 '10 at 13:21
    
"Service Temporarily Unavailable" is code 503. There is already 4 example in the link of the documentation, just change the code by 503 and the link to the html page you want to diplay –  radius Aug 13 '10 at 13:26
    
You mean ErrorDocument 503 foo.example.com/myerrorpage Ok, thanx. I will try that. –  Martin Aug 13 '10 at 13:34
add comment

you can change on following locations

#/var/www/error/

share|improve this answer
    
What is this? Config option or location or...? I apologise for being bit new to this. –  Martin Aug 13 '10 at 13:31
    
HI MARTIN, not worry boss!! on that location you'll have all error file just edit as you needed, i have done same fun out there for my server's –  Rajat Aug 13 '10 at 13:41
    
I don't have such directory as /var/www/error/. Is it a symbolic link? –  Martin Sep 29 '10 at 13:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.