How to customize error pages for only 502 and 503 and ignore other errors in Apache http server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using apache as proxy server and another application server (like tomcat) is behind apache. In apache side, I only want to customize error pages for 502 and 503 error and still show the application server's response if other errors appear.

What I do now is:

ProxyErrorOverride On
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/data/www/errors">
   AllowOverride None
   Options IncludesNoExec
   AddOutputFilter Includes html
   AddHandler type-map var
   Order allow,deny
   Allow from all
   LanguagePriority en es de fr
   ForceLanguagePriority Prefer Fallback
</Directory>

ErrorDocument 502 /errors/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /errors/HTTP_SERVICE_UNAVAILABLE.html.var

</IfModule>
</IfModule>

This works for 502 and 503, but it also overrides 4XX and other 5XX errors with apache's default pages, not as expected.

Is there a way to only override 502, 503 in Apache and ignore other errors? thanks.

Best Regards
--------------------
Sheng Qiang Xu (Sean) 徐胜强
IBM Workload Deployer, IBM China Development Lab
sqxu@xxxxxxxxxx,86-10-82450729


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux