Apache Mod_proxy Error Page
Contents |
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring apache proxyerroroverride developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ apache errordocument Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it apache custom error page works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ErrorDocument when using Apache as reverse-proxy up vote 2 down vote favorite 1 'evening, I have an Apache server (2.2.19)
Proxyerroroverride Example
and a 4D Webstar server (kinda unknown HTTP server) on the same physical server. Apache only listens the SSL port (443) and is used as a reverse-proxy to 4DW (through a SSL VHost). Here are the two proxy directives I use : ProxyPass / http://127.0.0.1:xxxx/ timeout=15 connectiontimeout = 15 ProxyPassReverse / http://127.0.0.1:xxxx/ Given the fact that the 4DW server can go offline from time to time, i'd like to have a custom 503 error page to notify the users of apache errordocument proxy the downtime or maintenance of the back-end app. Except Apache redirects everything from /htdocs/ (which is the documentroot) and we need quick access to the errordocument to edit it when needed (thus, an external errordoc is not an option). Is there any way to force Apache not to proxy a given directory (let's say htdocs/error/), or any solution at all as to using an errordocument outside of the DocumentRoot? Cheers apache-2.2 reverse-proxy share|improve this question asked Feb 6 '12 at 16:31 Proreborn 11313 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted Sure, just exclude it from the ProxyPass rules. These are evaluated in order, so make sure the exclusion is on top: ErrorDocument 503 /error/503.html ProxyPass /error/ ! ProxyPass / http://127.0.0.1:xxxx/ timeout=15 connectiontimeout = 15 ProxyPassReverse / http://127.0.0.1:xxxx/ share|improve this answer answered Feb 6 '12 at 17:07 Shane Madden♦ 91.1k6107181 Worked like a charm, cheers ! –Proreborn Feb 7 '12 at 8:46 2 For the sake of searchers, I believe you would actually need the ProxyErrorOverride directive to be in effect. –Cameron Kerr May 14 '15 at 1:24 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy po
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and no protocol handler was valid for the url policies of this site About Us Learn more about Stack Overflow the
The Proxy Server Received An Invalid Response From An Upstream Server.
company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered
Apache Redirect
Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody http://serverfault.com/questions/357276/errordocument-when-using-apache-as-reverse-proxy can ask a question Anybody can answer The best answers are voted up and rise to the top Apache Httpd Custom ErrorDocument 404 When ProxyPass returned 404 up vote 8 down vote favorite 6 I have an Apache web server in front of another application server, using Proxy Pass. When the request to application returned error 404, I want to show custom http://serverfault.com/questions/301916/apache-httpd-custom-errordocument-404-when-proxypass-returned-404 error page from the web server not the one that come from application server. I have tried to setup the ErrorDocument 404 on the virtual host, but it doesn't work. How should I do this? Or this is not possible?
Status:Extension Module Identifier:proxy_module Source File:mod_proxy.c Summary Warning Do not http://stackoverflow.com/questions/3617855/serve-error-pages-using-apache-http-server enable proxying with ProxyRequests until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large. mod_proxy and error page related modules implement a proxy/gateway for Apache HTTP Server, supporting a number of popular protocols as well as several different load balancing algorithms. Third-party modules can add support for additional protocols and load balancing algorithms. A apache mod_proxy error set of modules must be loaded into the server to provide the necessary features. These modules can be included statically at build time or dynamically via the LoadModule directive). The set must include: mod_proxy, which provides basic proxy capabilities mod_proxy_balancer and one or more balancer modules if load balancing is required. (See mod_proxy_balancer for more information.) one or more proxy scheme, or protocol, modules: ProtocolModule AJP13 (Apache JServe Protocol version 1.3)mod_proxy_ajp CONNECT (for SSL)mod_proxy_connect FastCGImod_proxy_fcgi ftpmod_proxy_ftp HTTP/0.9, HTTP/1.0, and HTTP/1.1mod_proxy_http SCGImod_proxy_scgi WS and WSS (Web-sockets)mod_proxy_wstunnel In addition, extended features are provided by other modules. Caching is pr
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Serve Error Pages Using Apache HTTP Server up vote 3 down vote favorite I am using Tomcat for hosting my web application and apache http server on top of it using mod proxy for load balancing. When my application throws a 404 or 500 error, I want to serve the error pages through apache http server rather than tomcat server. This is because I am serving all of my static content through apache and don't want it as part of war. Is there a way to do that? java apache tomcat apache2 mod-proxy share|improve this question edited Aug 3 '15 at 12:24 asked Sep 1 '10 at 12:15 Ankit Bansal 2,816729 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted Specify the "ErrorDocument" directive in the virtualhost section of your apache config: ErrorDocument 404 /path/to/my404page.html ErrorDocument 500 /path/to/my500page.html Additionally, since you're using mod proxy, you may you may wish to enable ProxyErrorOverride to let apache generate custom error documents for proxied content. Also check out the documentation share|improve this answer edited Sep 1 '10 at 14:45 answered Sep 1 '10 at 13:21 Jeroen Rosenberg 2,35611532 Awesome. Thanks Jeroen. It works perfectly. –Ankit Bansal Sep 2 '10 at 1:09 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer