Questions tagged [reverse-proxy]
A reverse proxy is a type of proxy server that fetches resources from a specific defined set of servers for a client. It is used in cases when there is an advantage to not exposing the web server with the content directly whether it be for security reasons or because of a lack of available public IP addresses.
220
questions
10
votes
1
answer
7k
views
How can I forward requests from my web server?
This is a Canonical Question about reverse proxies, how they work and how they are configured.
How can I serve requests from a service on a different port or from a different server with the same ...
77
votes
3
answers
206k
views
How to handle relative urls correctly with a reverse proxy
I have a reverse proxy setup as follows in Apache:
Server A with address www.example.com/folder is the reverse proxy server.
It maps to: Server B with address test.madeupurl.com
This kind of works....
316
votes
5
answers
740k
views
Nginx reverse proxy + URL rewrite
Nginx is running on port 80, and I'm using it to reverse proxy URLs with path /foo to port 3200 this way:
location /foo {
proxy_pass http://localhost:3200;
...
52
votes
7
answers
36k
views
Is there a name based virtual host SSH reverse proxy?
I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the ...
40
votes
5
answers
82k
views
How to handle relative urls correctly with a nginx reverse proxy
Sure I'm not the first one that tried to serve a domain example.com from a example.net/bbb, but I haven't found a solution yet.
My NGINX configuration follows the guidelines and looks something like ...
10
votes
1
answer
882
views
How do I make protocol foo hostname-aware?
This is a canonical question about hostname-awareness and proxying.
I know that some protocols are hostname-aware; that is, when I connect to the HTTP server at www.example.com it knows I want www....
152
votes
13
answers
186k
views
How to set up Nginx as a caching reverse proxy?
I heard recently that Nginx has added caching to its reverse proxy feature. I looked around but couldn't find much info about it.
I want to set up Nginx as a caching reverse proxy in front of Apache/...
26
votes
4
answers
29k
views
Can a Reverse Proxy use SNI with SSL pass through?
I need to serve several applications over https using one external ip address.
The ssl certificates should not be managed on the reverse proxy. They are installed on the application servers.
Can a ...
83
votes
4
answers
127k
views
nginx real_ip_header and X-Forwarded-For seems wrong
The wikipedia description of the HTTP header X-Forwarded-For is:
X-Forwarded-For: client1, proxy1, proxy2, ...
The nginx documentation for the directive real_ip_header reads, in part:
This ...
152
votes
7
answers
418k
views
Make nginx to pass hostname of the upstream when reverseproxying
I run several docker containers with hostnames:
web1.local
web2.local
web3.local
Routing to these done based on hostname by nginx. I have a proxy in front of this setup (on different machine ...
109
votes
4
answers
224k
views
an upstream response is buffered to a temporary file
I have a rather large and slow (complex data, complex frontend) web application build in RoR and served by Puma with nginx as reverse proxy.
Looking at the nginx error log, I see quite a few entries ...
45
votes
3
answers
177k
views
nginx as reverse proxy with upstream SSL
I'm building a proxy for an internal API to allow clients to connect without having to have the self-signed certificates installed.
Clients (built, owned and used only internally) will connect over ...
52
votes
3
answers
80k
views
Use HTTP/2.0 between nginx reverse-proxy and backend webserver
I use nginx as a reverse-ssl-proxy in front of a backend webserver that is capable of doing HTTP/2.0.
I noticed that nginx proxies the requests to the backend server via HTTP/1.1 rather than HTTP/2.0....
58
votes
3
answers
188k
views
Proxy HTTPS requests to a HTTP backend with NGINX
I have nginx configured to be my externally visible webserver which talks to a backend over HTTP.
The scenario I want to achieve is:
Client makes HTTP request to nginx which is redirect to the same ...
13
votes
1
answer
22k
views
How to stop nginx 301 auto redirect when trailing slash is not in URI?
Every time I try foobar.com/test in browser, nginx seems to redirect (301) the client to foobar.com/test/. This behaviour is unacceptable. The proxied server is a remote Apache web server. I have ...
9
votes
6
answers
34k
views
Apache reverse proxy error page when proxied server is down
I am using Apache2 as a reverse proxy for tomcat, my configuration being something like:
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
My ...
85
votes
4
answers
184k
views
Can IIS be configure to forward request to another web server?
I have several web site set up on one IIS 6 server distinguished by Host Header.
However, I wish to have one of the sites served by a Linux / Apache server on my network. Do I need to use a reverse ...
49
votes
3
answers
22k
views
Why is setting Nginx as a reverse proxy a good idea?
I have a Django site running on Gunicorn with a reverse proxy through Nginx.
Isn't Nginx just an extra unnecessary overhead?
How does adding that on top of Gunicorn help?
38
votes
2
answers
100k
views
How to reverse proxy to different places depending on subdomain in Nginx?
I have multiple subdomains, all pointing to one machine, and one IP address. On this machine, I want to have nginx acting as a reverse proxy, and depending on which subdomain was used to access the ...
28
votes
6
answers
20k
views
What is a Reverse Proxy?
I know what a proxy is, but I'm not sure what a reverse proxy is. It seems to me that it's probably akin to a load balancer. Is that correct?
7
votes
1
answer
13k
views
Can nginx listen on port 80, but send upstream to backend using SSL on 443?
For PCI compliance, my application is forced to use a secure/encrypted connection between the reverse proxy server and backend app server, whereas the connection coming into the reverse proxy is on ...
5
votes
1
answer
13k
views
ProxyHTMLURLMap not working in apache2.4
I am using apache2.4 on ubuntu 14.04. And I have enabled mod_proxy_html.But my URL are not getting replaced by a new one. Same thing I did in apache2.2 and it was working perfectly.
This is my ...
57
votes
3
answers
128k
views
Configure Nginx as reverse proxy with upstream SSL
I try to configure an Nginx server as a reverse proxy so the https requests it receives from clients are forwarded to the upstream server via https as well.
Here's the configuration that I use:
http ...
25
votes
5
answers
102k
views
proxy:error AH00898: Error during SSL Handshake with remote server
I have a server that acts as a front-end for a cPanel mailserver in a network. The apache proxy on the front-end server ran for 152 days without fault then suddenly I now get 500/502 errors when using ...
20
votes
2
answers
15k
views
Some nginx reverse proxy configs stops working once a day
I have an nginx reverse-proxy which proxies requests from an outer amazon ELB to internal ELBs.
I have 6 backend instances that handles the requests. The site-enabled configs looks like this, but ...
18
votes
4
answers
60k
views
Set header in apache if it doesn't already exist
I have a proxy that is injecting some headers but I want to modify it so it only sets the headers if they are not already present:
<Location /api>
RequestHeader set MY_HEADER "value"
...
17
votes
1
answer
46k
views
Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0
I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with ...
17
votes
2
answers
102k
views
Apache URL rewriting in reverse proxy
I'm deploying Apache in front of a Karaf-hosted application (Apache and Karaf are on separate servers). I want Apache to operate as a reverse proxy and also to hide part of the URL.
The URL to get ...
16
votes
2
answers
46k
views
nginx reverse ssl proxy with multiple subdomains
I'm trying to locate a high level configuration example for my current situation. We have a wildcard SSL certificate for multiple subdomains which are on several internal IIS servers.
site1.example....
15
votes
2
answers
103k
views
Use Nginx as Reverse Proxy for multiple servers
I am trying to configure nginx as a reverse proxy for multiple servers on my LAN. They should go out on my WAN with different subdomains. My configuration looks like this:
@ReverseProxy:/etc/nginx/...
14
votes
1
answer
23k
views
How to log original value of $remote_addr when using Real-IP
My environment has user requests passing through a number of systems:
[Client] --> [ELB] ---> [nginx] --> [web]
(ELB = AWS Elastic Load Balancer)
Thanks to this answer, I have nginx determining and ...
14
votes
5
answers
124k
views
nginx config fails with SSL key/pem (unique case)
I am trying to install SSL on my nginx reverse proxy with certified ssl keys but i get this message when i try to restart server:
Restarting nginx: [emerg]: SSL_CTX_use_PrivateKey_file("/etc/nginx/...
10
votes
1
answer
58k
views
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 ...
8
votes
2
answers
20k
views
Which ssl certificates go where on an reverse proxy? - nginx
Need clarification for upstream SSL on an nginx reverse proxy server
I've been reading the nginx docs regarding reverse proxy and securing ssl connections to upstream servers but I'm still confused ...
7
votes
3
answers
19k
views
How to point sub-domains to different local IP
My question is the same with How to point a subdomain to local server with dynamic IP. The difference is that I do have a static IP from my ISP, I think i do not need to use DynDNS right? so what can ...
7
votes
2
answers
19k
views
NGINX is giving 404 errors on all but the HTML pages
I setup nginx as a reverse proxy in a docker container to link to sites outside of the container. I have a vhost config setup as follows (I tried adding the ^~ before the location for home-assistant):...
5
votes
2
answers
13k
views
How can I set use mod_proxy_ajp with Apache and Tomcat?
I'd like to run Apache and Tomcat on an RHEL 5 server with Apache handling Ruby on Rails apps (through mod_rails/Passenger) and Tomcat handling Java apps.
Under Apache, each Rails app will have a URL ...
5
votes
2
answers
22k
views
nginx as reverse proxy with several domains & hosts
This question has probably been asked several times, but with all results I can find and my little knowledge, I'm kind of lost. I'm using Fedora 29.
What I try to do with nginx :
Use one let's ...
4
votes
1
answer
8k
views
Cookie Authentication in Apache
I'm trying to set up a reverse proxy in Apache. The user will be required to log in, and will then be sent a cookie. I want Apache to check the cookie. Is there a way to do this?
EG, right now my ...
4
votes
2
answers
3k
views
Nginx as reverse proxy for GitLab with SSL?
I have GitLab's nginx setup to listen at 127.0.0.1:8088 . Then I have a system nginx (installed via apt-get on Ubuntu) setup as reverse proxy with HTTPS:
upstream gitlab {
server ...
4
votes
2
answers
5k
views
How to remove request blocking on apache reverse proxy after failure of backend before asking backend again?
I am working on an apache2 reverse proxy vhost. When the server behind apache is down, the first request to apache shows the error page of course.
But at subsequent requests it seems apache delays ...
4
votes
2
answers
5k
views
Requests per second slower when using nginx for load balancing
I've set up nginx as a load balancer that reverse proxies requests to 2 Apache servers. I've benchmarked the setup with ab and am getting approx 35 requests per second with requests distributed ...
3
votes
1
answer
6k
views
Connect to a Tomcat Server from nginx as reverse proxy
I have a Tomcat server serving a web application and I have a Nginx server running in front of it as a reverse proxy. As an answer to my earlier question (Tomcat server behind nginx reverse proxy - ...
3
votes
2
answers
39k
views
What is wrong with my nginx reverse proxy configuration, with single server (and more later)
I'm trying to get an nginx reverse proxy setup working. I have two web servers set up, once with nginx, and one with apache2. I'm currently not able to get it working with just the nginx server, so ...
3
votes
1
answer
12k
views
How can I get apache to serve static content in a reverse-proxied setup?
I have a setup where my Tomcat instances are fronted with Apache servers with mod-proxy. I need to serve static content on the reverse-proxy side in case authentication closes my app session (heavy ...
2
votes
1
answer
14k
views
Apache server : Reverse proxy and websockets via mod_proxy_wstunnel
I have a little problem with the web sockets and my reverse proxy apache, i have upgraded in latest release 2.4.5 and loaded the module mod_proxy_wstunnel.
The httpd.conf :
<VirtualHost *:80&...
2
votes
2
answers
10k
views
Jenkins behind nginx reverse proxy in subdirectory
I am struggling setting up Jenkins in a subdirectory behind nginx. There are 2 apps running on localhost. One of those is jenkins, which should be accessible by visiting foo.com/jenkins. The other app ...
2
votes
3
answers
8k
views
Needed: Simple HTTP reverse proxy for Windows 2008
I need a simple HTTP reverse proxy to be installed on Windows Server 2008 x86 32.
All I need from it is to route incoming HTTP (GET and POST) requests to another machine, with a different port, and ...
2
votes
5
answers
4k
views
I am looking for a good load balancing (or reverse proxy) software for TCP and HTTP, any suggestions? [closed]
I am looking for a good load balancing (or reverse proxy) software for TCP and HTTP, any suggestions?
1
vote
2
answers
1k
views
running nginx as a reverse proxy with apache
Q1) Do I need mod_deflate running on apache? does it help in performance in anyway?
Q2) Do I need mod_cache running on apache if nginx is serving a static caching proxy?
<IfModule mod_cache.c>
...