How to redirect Maintance Page without restarting IBM HTTP Server - Websphere

This is a discussion on How to redirect Maintance Page without restarting IBM HTTP Server - Websphere ; Hi all, i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are placed in webserver Now, i want to like whenever the application server is down, the login page should redirect to maintanence html page ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: How to redirect Maintance Page without restarting IBM HTTP Server

  1. How to redirect Maintance Page without restarting IBM HTTP Server

    Hi all,



    i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are placed in webserver



    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.



    Please help on this.

  2. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    Try the following directive in your httpd.conf
    ErrorDocument 500 /appdown.html <--- point to your static errorpage


    - Sunit

    wrote in message
    news:1370898712.1202132290269.JavaMail.wassrvr@lts gwas010.sby.ibm.com...
    > Hi all,

    >

    > i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are
    > placed in webserver

    >

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

    >

    > Please help on this.



  3. Re: How to redirect Maintance Page without restarting IBM HTTPServer

    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?

  4. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    karthick.surendran@honeywell.com wrote:
    > Hi,
    >
    > Images,CSS and scripts are in under the contextroot in webserver i.e location/htdocs/en_US//
    >
    > 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

  5. Re: How to redirect Maintance Page without restarting IBM HTTPServer

    Thanks for your reply.



    I configure ErrorDocument 404 /<context-root>/down.html under virtualhost <ip:443>



    But,still i geeting 404 page not my page, could you please tell how to configure ErrorDocument

  6. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    karthick.surendran@honeywell.com wrote:
    > Thanks for your reply.

    >

    > I configure ErrorDocument 404 /<context-root>/down.html under virtualhost <ip:443>

    >

    > But,still i geeting 404 page not my page, could you please tell how to configure ErrorDocument
    >

    What URL gives you this error?

    Ken

  7. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    karthick.surendran@honeywell.com wrote:
    > Thanks for your reply.

    >

    > I configure ErrorDocument 404 /<context-root>/down.html under virtualhost <ip:443>

    >

    > 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

  8. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    karthick.surendran@honeywell.com wrote:
    > Hi all,

    >

    > i have IBM HTTP Server 6.1 and WAS 6.1 and all the static content are placed in webserver

    >

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

    >

    > 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

  9. Re: How to redirect Maintance Page without restarting IBM HTTPServer

    Hi,



    Below condition its work for me



    RewriteCond %{DOCUMENT_ROOT}/portal/down.html -f

    RewriteCond %{SCRIPT_FILENAME} !down.html

    RewriteRule ^(.*)$ /<contextroot>/down.html [L]



    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.



    And also ErrorDocument is not working.

  10. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    karthick.surendran@honeywell.com wrote:
    > Hi,

    >

    > Below condition its work for me

    >

    > RewriteCond %{DOCUMENT_ROOT}/portal/down.html -f

    > RewriteCond %{SCRIPT_FILENAME} !down.html

    > RewriteRule ^(.*)$ /<contextroot>/down.html [L]

    >

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

    >

    > 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

  11. Re: How to redirect Maintance Page without restarting IBM HTTPServer

    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.

  12. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    I am having a similar issue, where the following happens: I am using IBM http server as my front end server, and WebSphere as my application server.

    I am trying to configure httpserver config file (httpd.conf) to display a certain page when my application
    server is down - but that is not working. ( that is I have my http server running, but the actual app server is stopped). I tried setting the errorDocument directive to display some text in case of 500, 501, 502 or 503 errors, but it does not show any of the error messages. Instead, when I try to hit a service on the app server, it shows something as follows:


    Failed to Connect

    Firefox can't establish a connection to the server at localhost:9080.


    Though the site seems valid, the browser was unable to establish a connection.

    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.


    I want the custom error message that I put in the httpd.conf to show when a user tries to hit the service on the appserver and the application server is down.

    How did you guys solve this issue?

  13. Re: How to redirect Maintance Page without restarting IBM HTTP Server

    I am having to deal with the same situation where I am trying to redirect to maintenance html page when the websphere application server is down. My http server remains up all the time. How were you guys able to do this using the mod rewrite? I eventually want to be able to redirect to a maintenance page when the app server is up, but a service within the app server is down.

+ Reply to Thread