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.
3,222
questions
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;
...
185
votes
5
answers
103k
views
What is the difference between Load Balancer and Reverse Proxy?
I'm not clear about the difference between Load Balancer and Reverse Proxy. They both seems having same behavior: distributing incoming requests to backend servers.
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 ...
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/...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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....
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?
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 ...
45
votes
4
answers
150k
views
Forward Custom Header from Nginx Reverse Proxy
I have an nginx web server acting as a reverse proxy to forward requests on to Apache for additional handling (I'm begging you not to ask why). I have a request to which I'm trying to attach a custom ...
44
votes
4
answers
86k
views
How can I debug nginx further than the error log?
I'm currently receiving a fairly large HTTP flood right now, and it's causing my nginx reverse proxy to produce a 502 Bad Gateway.
I have a frontend server running nginx as a proxy to my backend ...
44
votes
5
answers
50k
views
Nginx vs Apache as reverse proxy, which one to choose
this kind of question maybe has been asked here
but I couldn't find any that really match my question.
Heard that nginx performance is quite impressive,
but Apache has more docs, community(read:expert)...
43
votes
3
answers
70k
views
What tools are available on Windows to simulate/emulate network issues?
I am looking for tools for Windows that can act as a reverse-proxy in front of a server to introduce various networking issues like jitter, delays, or packet loss.
My preference is a software ...
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 ...
39
votes
6
answers
16k
views
What is a typical method to scale out a software load balancer?
I often see web app architectures with a SLB / reverse-proxy in front of a bunch of app servers.
What happens when the number of connections to the SLB requires too many resources for a single SLB to ...
39
votes
3
answers
122k
views
How to rewrite the domain part of Set-Cookie in a nginx reverse proxy?
I have a simple nginx reverse proxy:
server {
server_name external.domain.com;
location / {
proxy_pass http://backend.int/;
}
}
The problem is that Set-Cookie response headers contain ;...
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 ...
38
votes
4
answers
76k
views
Using Https between Apache Loadbalancer and backends
I am using an apache (2.4) server configured as loadbalancer in front of 2 apache servers. It works fine when I use http connections between loadbalancer and backends, however using https does not ...
33
votes
4
answers
43k
views
What are the Differences between HAProxy and Ngnix in reverse proxy mode?
What are the differences between HAProxy and Nginx when it comes to their abilities as a reverse proxy?
33
votes
2
answers
75k
views
Nginx Config: Front-End Reverse Proxy to Another Port
I have a small web server that serves requests on port 5010 rather than 80.
I would like to use nginx as a front end proxy to receive requests on port 80 and then let those requests be handle by port ...
33
votes
2
answers
60k
views
Modify HTML pages returned by nginx reverse proxy
I have a reverse proxy setup for access to a third party application located inside a intranet from the internet.
Let's say this application is on the URL:
https://internalserver:8080/ (reachable ...
32
votes
2
answers
39k
views
Nginx: How To Completely Disable Request Body Buffering
I'm trying to set up Madsonic on my Ubuntu box and have Nginx run in front of it. Problem is, I keep getting this warning when I try to upload stuff through the web interface:
31115#0: *14 a client ...
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?
26
votes
2
answers
126k
views
Serving multiple proxy endpoints under location in Nginx
I have a couple of API endpoints that I want to serve from under a single location of /api with subpaths going to different endpoints. Specifically, I want webdis to be available at /api and a ...
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 ...
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 ...
25
votes
2
answers
31k
views
nginx add header conditional on an upstream_http_ variable
I have a reverse proxy on nginx which proxies quite a few sites. I have recently enabled HTTP Strict Transport Security for all SSL-enabled websites. I now have one site that doesn't want to have this ...
23
votes
3
answers
66k
views
Apache proxy_http redirect to ip and set hostname
hopefully you guys can help me with a proxy problem I have.
What I already have
I have set up an apache http reverse proxy, to proxy requests from *.proxy.domain to *.intern.domain. The apache is ...
23
votes
3
answers
27k
views
nginx failover without load balancing
I'm having trouble configuring nginx.
I'm using nignx as a reverse proxy. I want to send my all requests to my first server. If the first server is down, I want to send requests to second server.
In ...
22
votes
1
answer
25k
views
Redirect a subpath to a external host with Nginx
I need to create a quite simple map in Nginx redirecting a subpath to another server that is located in the same subnet.
Nginx server: 192.168.0.2
Tomcat server: 192.168.0.3:8443
I tried to put this ...
21
votes
2
answers
42k
views
NGINX Proxy_Pass remove url substring
I have one NGINX acting as reverse proxy. I need to remove a substring string_1 from the URL, the rest of the URL is variable.
Example:
Origin: http://host:port/string_1/string_X/command?xxxxx
...
20
votes
6
answers
118k
views
How to solve nginx reverse proxy mixed content(http, https)
New to nginx. Played with it for 2 days and cannot figure out how to solve this:
I have a bunch of VMs running in one box, the box is behind my router obviously, one of the VMs is running nginx(my ...
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 ...
19
votes
7
answers
41k
views
Will a reverse proxy in front of web server improve security?
Third-party security professional is recommending we run a reverse proxy in front of the web server (all hosted in the DMZ) as a best practice security measure.
I know this is a typical recommended ...
18
votes
6
answers
58k
views
How to proxy /grafana with nginx?
I've setup and started default grafana and it works as expected on http://localhost:3000. I'm trying to proxy it with nginx where I have ssl installed. I'm trying to have it respond to https://...
18
votes
1
answer
54k
views
nginx proxy subdomains to other addresses and ports [closed]
I'm newbie with nginx, but I need to create some proxy rules based on the subdomain to redirect to another IP and Port.
This is my case:
My domain.com has IP y.y.y.y and accepts requests on port 80
...
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
3
answers
28k
views
Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs?
Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs? The documentation on substitute is not clear.
I have some pages I am reverse ...
17
votes
2
answers
85k
views
nginx proxy_pass using subfolder
ok, this task should be simple but I just can't get it to work. I would like to have a subfolder after my domain name (actually after the IP of that domain name), which redirects to a specific port on ...
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....
16
votes
1
answer
13k
views
can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)
I have a virtual host set up to redirect ntung-gitblit.localhost --> myserver:1279. However, it's not working with forward encoded slashes (%2f). The URL I'm trying to access is,
http://ntung-gitblit....
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/...
15
votes
4
answers
46k
views
Controlling Nginx proxy target using a cookie?
I'm trying to convert a reverse proxy using an interesting Apache mod_rewrite setup to use Nginx instead (due to external concerns we are moving from Apache to Nginx, and most everything works fine ...