Discussion:
How to redirect Maintance Page without restarting IBM HTTP Server
(too old to reply)
k***@honeywell.com
2008-02-04 13:37:39 UTC
Permalink
Hi all,<br />
<br />
i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are placed in webserver<br />
<br />
Now, i want to like whenever the application server is down, the login page should redirect to maintanence html page without restart the IBM HTTP Server and my maintanence page using images,CSS files.<br />
<br />
Please help on this.
Sunit Patke
2008-02-04 14:31:57 UTC
Permalink
Try the following directive in your httpd.conf
ErrorDocument 500 /appdown.html <--- point to your static errorpage


- Sunit
Post by k***@honeywell.com
Hi all,<br />
<br />
i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are
placed in webserver<br />
<br />
Now, i want to like whenever the application server is down, the login
page should redirect to maintanence html page without restart the IBM HTTP
Server and my maintanence page using images,CSS files.<br />
<br />
Please help on this.
k***@honeywell.com
2008-02-05 08:42:16 UTC
Permalink
Hi,<br />
<br />
Images,CSS and scripts are in under the contextroot in webserver i.e &lt;webserver&gt;location/htdocs/en_US/&lt;contextroot&gt;/<br />
<br />
If my app server is down,then no images and CSS are not showing.Why its happened?<br />
<br />
Is it possible to use without errorDocument code?
Ken Hygh
2008-02-05 10:52:52 UTC
Permalink
Hi,
Images,CSS and scripts are in under the contextroot in webserver i.e <webserver>location/htdocs/en_US/<contextroot>/
If my app server is down,then no images and CSS are not showing.Why its happened?
Is it possible to use without errorDocument code?
is your contextroot the same as your WAS context root? if so, search
this forum for 'FileServingEnabled', it's an attribute in one of the IBM
WAR extension files that will allow static content to be served from
your HTTP server instead of from your AppServer.

Ken
k***@honeywell.com
2008-02-05 12:16:42 UTC
Permalink
Thanks for your reply.<br />
<br />
I configure ErrorDocument 404 /&lt;context-root&gt;/down.html under virtualhost &lt;ip:443&gt;<br />
<br />
But,still i geeting 404 page not my page, could you please tell how to configure ErrorDocument
Ken Hygh
2008-02-05 13:34:51 UTC
Permalink
Post by k***@honeywell.com
Thanks for your reply.<br />
<br />
<br />
But,still i geeting 404 page not my page, could you please tell how to configure ErrorDocument
What URL gives you this error?

Ken
Eric Covener
2008-02-05 15:20:13 UTC
Permalink
Post by k***@honeywell.com
Thanks for your reply.<br />
<br />
<br />
But,still i geeting 404 page not my page, could you please tell how to configure ErrorDocument
If the 404 is generated by e.g. WebSphere or really by anything but a
missing static file, IHS will not replace the body with its own error
document.
--
Eric Covener
Eric Covener
2008-02-05 15:23:47 UTC
Permalink
Post by k***@honeywell.com
Hi all,<br />
<br />
i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are placed in webserver<br />
<br />
Now, i want to like whenever the application server is down, the login page should redirect to maintanence html page without restart the IBM HTTP Server and my maintanence page using images,CSS files.<br />
<br />
Please help on this.
One common technique is to copy/touch a file somewhere in the filesystem
to close the server down. This example has you copying
"maintenance.html" into your document root to have all requests
redirected to it. When the maintenance is over, move the
maintenance.html out of the way.

Note: for this to work the ServerName has to be correct and the plugin
can't be handling /*


RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteRule . /maintenance.html [R]
--
Eric Covener
k***@honeywell.com
2008-02-08 06:55:27 UTC
Permalink
Hi, <br />
<br />
Below condition its work for me<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/portal/down.html -f<br />
RewriteCond %{SCRIPT_FILENAME} !down.html<br />
RewriteRule ^(.*)$ /&lt;contextroot&gt;/down.html [L]<br />
<br />
Now, the problem in my maintanence page using CSS and stylesheets, now the page is coming without images,stylesheets could you please tell me how to allow images using above scenerio.<br />
<br />
And also ErrorDocument is not working.
Eric Covener
2008-02-08 16:07:33 UTC
Permalink
Post by k***@honeywell.com
Hi, <br />
<br />
Below condition its work for me<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/portal/down.html -f<br />
RewriteCond %{SCRIPT_FILENAME} !down.html<br />
<br />
Now, the problem in my maintanence page using CSS and stylesheets, now the page is coming without images,stylesheets could you please tell me how to allow images using above scenerio.<br />
<br />
And also ErrorDocument is not working.
Where are the images and stylesheets served form?

Can you just add a RewriteCond %{REQUEST_URI} to allow them (not rewrite
to down.html) based on some regex?
--
Eric Covener
Ken STL
2008-02-08 17:37:00 UTC
Permalink
We had the same issue. Our developers supplied the maintenance page as a single .gif file and we rewrite to this page during planned maintenance.
Loading...