INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Apache with mod jk maintenance page when tomcat goes down

Apache with mod jk maintenance page when tomcat goes down

Apache with mod jk maintenance page when tomcat goes down

(OP)
Hello All,

I would like to set Apache maintenance page when tomcat goes down.

I have apache installed and using mod_jk connector to redirect request to backend tomcat servers.

I did following configurations under virtualhost 443 to setup maintenance page but it is not working as expected.

Alias /error/ "/opt/apache24/htdocs/"
ErrorDocument 503 /error/maintenance.html
JKMount /UserPortal tomcat1
JKMount /UserPortal/* tomcat1
JkUnMount /error* tomcat1

Kindly suggest if anything else is required to setup maintenance page.

Thanks

RE: Apache with mod jk maintenance page when tomcat goes down

Define "not working as expected"


"under virtualhost 443 "

Which means that it ONLY applies to HTTPS connections.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind these jesus character, stars had to die for me to live.

RE: Apache with mod jk maintenance page when tomcat goes down

(OP)
Hello Chris,

Thanks for the response.

I mean I am not getting customized maintenance page when backend server tomcat is down.

Thanks

RE: Apache with mod jk maintenance page when tomcat goes down

Quote:


I mean I am not getting customized maintenance page when backend server tomcat is down.

That's because a HTTP:503 response only applies to services that are on the same host machine NOT when a remote service is inaccessible.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind these jesus character, stars had to die for me to live.

RE: Apache with mod jk maintenance page when tomcat goes down

(OP)
Hello Sir,

Thanks for the response.

Kindly let me know what should be done in this case.

Can't we set customized maintenance page when tomcat goes down on remote machine.

Thanks

RE: Apache with mod jk maintenance page when tomcat goes down

You need to catch whatever response the local server gives when the remote server is 'down', it will probably be either a 408 response (Request Timeout) or a 502 response (Bad Gateway). I can't tell you which one it will be, as I don't know how your system is set up.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind these jesus character, stars had to die for me to live.

RE: Apache with mod jk maintenance page when tomcat goes down

(OP)
I have checked the logs and found that it is catching error code 503.

Kindly help me what needs to be done in this case.

Thanks

RE: Apache with mod jk maintenance page when tomcat goes down

(OP)
Now the issue is resolved.I am able to get customized maintenance page.

I have to comment the following line(Require all denied) in the apache configuration file.

Before

<Directory />
AllowOverride none
Require all denied
</Directory>

After

<Directory />
AllowOverride none
#Require all denied
</Directory>

Thanks everyone for all your kind support.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close