Module for the apache webserver with which apache can be used as proxy server. With this module apache can act as a regular proxy, or as a reverse proxy for upstream servers.
Questions tagged [mod-proxy]
689 questions
11
votes
1 answer
Apache Httpd Custom ErrorDocument 404 When ProxyPass returned 404
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 error page from the web server not the one that come from application server. I have…

hendry.fu
- 225
- 1
- 2
- 7
11
votes
2 answers
setting up a basic mod_proxy virtual host
I'm trying to set up a basic virtual host to proxy all requests to test.local to a WEBrick server I have running on 127.0.0.1:8080 while keeping all requests to localhost going to my static files in /var/www. I'm running Ubuntu 10.04.
I have…

SevenProxies
- 113
- 1
- 1
- 4
10
votes
3 answers
"No protocol handler valid for the URL" with httpd mod_proxy_balancer
I'm trying to set up failover for a reverse-proxied server with a localhost static copy of resources that would usually be served by a content management system. I've used wget to grab a static copy of the dynamic site for failover purposes.
I've…

Christopher Schultz
- 1,105
- 2
- 12
- 22
10
votes
1 answer
Use apache as a HTTPS to HTTP Proxy
I'm trying to configure Apache on Centos 6 to proxy and reverse proxy traffic to an http server of a third party provider.
The setup should work like this:
https://mydomain.com/proxy/
proxies all trafic transparently…

james_t
- 203
- 1
- 2
- 5
10
votes
3 answers
Understanding apache 2.4 mod_proxy_fcgi and RewriteRules in htaccess
We've recently switched one of our web servers to apache 2.4 and running PHP via php-fpm and mod_proxy_fcgi. Most everything works quite well, but there is one problem that I don't understand yet. One of our sites is running WordPress, which brings…

Konrad Neuwirth
- 223
- 1
- 2
- 6
10
votes
2 answers
How to configure mod_proxy to ProxyPass based on http vs https?
I have Apache Tomcat running with SSL enabled. I have Apache HTTP Server acting as a reverse proxy so my if users hit http://myserver/tomcat/ they are passed to http://myserver:8080.
ProxyPass /tomcat/ http://myserver:8080/
ProxyPassReverse /tomcat/…

codecraig
- 387
- 2
- 4
- 8
9
votes
3 answers
Apache mod_proxy: forward secure websocket to non-secure
The websocket library I rely on (PHP-Websockets) does not yet support secure sockets (wss). My website is served over https though, so I cannot use insecure ws connections.
I'm trying to use Apache's mod_proxy to forward the secure request that…

BeetleJuice
- 411
- 2
- 4
- 12
9
votes
1 answer
Gunicorn behind apache link to localhost
I have a gunicorn serving a flask application behind Apache using mod_proxy.
Gunicorn is on http://localhost:8080/. Let's say my server is on http://example.com/
Sometimes when I post an invalid link to my server (like forgetting the trailing),…

Alexis Benoist
- 193
- 1
- 1
- 4
9
votes
3 answers
Apache Reverse Proxy Java Application Server CLOSE_WAIT Connections
I've got Apache setup as a reverse proxy for a Java Application server (GlassFish) and I noticed there are about 100 connections in the state CLOSE_WAIT even on an idle development system:
sudo netstat -n -e -p -a -t | grep httpd | grep CLOSE_WAIT…

Ryan
- 430
- 5
- 13
9
votes
1 answer
How to pass a request from one apache server to another
I have two Apache Servers with mod_proxy enabled. I want to know how to "pass the request" from "Apache Server A" to "Apache Server B" using the same port (80).
In "server A" with internal ip: 192.168.0.5 I have configured DNS and I am also using it…

maxtorzito
- 223
- 1
- 3
- 6
9
votes
3 answers
ProxyPreserveHost on individual proxypass rules
I have two proxypass rules on my web host, one that points to a local varnish instance for caching purposes, which I want ProxyPreserveHost enabled for, and another that points to a third party hosted site, which I want ProxyPreserveHost disabled…

580farm
- 241
- 2
- 4
- 12
9
votes
1 answer
Apache ProxyPass or ProxyPassMatch to exclude a file from proxying
I have a VirtualHost set to proxy all requests to another server running on port 9000.
What I have :
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
What I've tried :
! ProxyPass /test.html…

Andrei
- 463
- 2
- 5
- 12
8
votes
5 answers
How do I smoothly migrate a web server's DNS from one IP address to another?
I currently have a domain name registered for a Linux/Apache server that I am going to replace with another on a new IP address.
Migrating the data will be relatively quick and a 5 minute disruption during that process is acceptable.
The DNS…

Tom
- 2,652
- 1
- 20
- 12
8
votes
1 answer
mod_deflate - Optimal configuration for most browsers
I was wondering if someone here could help me determine the optimal standard configuration for using mod deflate with Apache. Basically, mod_deflate recommends using the following configuration for getting started right away:
Compress only a few…

Jason Huntley
- 1,253
- 3
- 10
- 22
8
votes
2 answers
Rewriting 302 App Server ReDirect URLs with Apache Proxy in the Middle
I have an odd setup. It looks like this:
Browser ----------> HTTPs Proxy ------> Apache HTTP -----> Tomcat AJP
HTTPS HTTP AJP
On the HTTPS proxy (a very dumb proxy), a URL comes in looking like https:…

George
- 171
- 1
- 1
- 4