Custom Apache ErrorDocument with proxy balancer & RewriteEngine

386

Setting LogLevel Debug I found:

[Mon Sep 14 19:26:06 2009] [debug] proxy_util.c(2015): proxy: connected /++skin++SandboxSkin/site/++vh++http:sub.domain.com:80/++/custom-errors/customerror.html to localhost:6080

Which confirmed that the proxy was trying to serve the error from the offline servers location.

Adding:

RewriteCond %{REQUEST_URI} !^/custom-errors/

Stopped the proxy rewriting any redirects with 'custom-errors' directories in the request.

After that, the following simplified ErrorDocument rule worked fine:

DocumentRoot "/var/www"
ErrorDocument 503 "/custom-errors/customerror.html"
Share:
386

Related videos on Youtube

Tg.
Author by

Tg.

Updated on September 17, 2022

Comments

  • Tg.
    Tg. over 1 year

    I have a file which has a list of library I need for a perl script. How to tell the perl to automatically install all of them ?

    The file I have it something like this.

    dependencies.txt

    Memoize
    Carp
    Time::Hires