Questions tagged [reverse-proxy]

A reverse proxy server usually refers to an HTTP accelerator or load-balancer which proxies requests on behalf of the actual clients to one or more backend HTTP servers.

A reverse proxy server usually refers to an proxy server which proxies requests on behalf of the actual clients to one or more backend HTTP servers.

It can be used as HTTP accelerator, or load-balancer, or to give the access to LAN internal web-services to Internet users.

Wikipedia: Reverse proxy

Apache HTTP as forward and reverse proxies

5119 questions
42
votes
5 answers

How to configure nginx X-Forwarded-Port to be the originally request port

I am using nginx in a standard reverse proxy scenario, to pass all requests to /auth to another host, however I'm trying to use non-standard ports. My end goal is to have the X-Forwarded-Port header set to the port that the request comes in on. Here…
42
votes
4 answers

Nginx reverse proxy to Heroku fails SSL handshake

I'm unfortunately not much of a system administrator and have come upon a problem that has me banging my head against the wall. The short story is that I'm running Nginx on EC2 (Ubuntu 14.04.4 LTS) to (a) host my company's marketing site…
Bart
  • 1,341
  • 1
  • 9
  • 8
42
votes
4 answers

nginx proxy_pass to a linked docker container

I have two docker containers with nginx. container1 is linked to container2. Docker then adds an entry to /etc/hosts which I entered into the nginx configuration like so: server { location ~ ^/some_url/(.*)$ { proxy_pass…
Tim
  • 1,315
  • 1
  • 14
  • 35
40
votes
6 answers

How do you handle CORS in an electron app?

I'm building an electron app and need to call APIs where the API provider has not enabled CORS. The typically proposed solution is to use a reverse proxy which is trivial to do when running locally by using node and cors-anywhere like this: let…
Shagymoe
  • 1,296
  • 1
  • 15
  • 22
40
votes
8 answers

Spring Boot with embedded Tomcat behind Apache proxy

We have a Spring Boot (Spring MVC) app with embedded Tomcat on a dedicated appserver behind an Apache SSL proxy. The SSL port on the proxy server is 4433, forwarding to port 8080 on the appserver. So the URL to the proxy server is forwarding…
Rop
  • 3,359
  • 3
  • 38
  • 59
40
votes
4 answers

Nginx does redirect, not proxy

I want to set up Nginx as a reverse proxy for a https service, because we have a special usecase where we need to "un-https" a connection: http://nginx_server:8080/myserver ==> https://mysecureservice But what happens is that the actual https…
mitchkman
  • 6,201
  • 8
  • 39
  • 67
39
votes
2 answers

What does the Resolver param in nginx do?

I am using nginx as a reverse_proxy server with ELB. I am looking for explanation regarding the resolver value I set in the nginx.conf file. My nginx.conf: http { ... resolver x.x.x.x valid=30s; ... } server { ... set $elb…
guyyug
  • 897
  • 1
  • 11
  • 23
38
votes
2 answers

How to pass all Python's traffics through a http proxy?

I want to pass all Python's traffics through a http proxy server, I checked urlib2 and requests packages for instance, they can be configured to use proxies but how could I use something like a system-wide proxy for Python to proxy all the data out?…
Hassan Abedi
  • 790
  • 1
  • 7
  • 22
37
votes
2 answers

When using proxy_pass, can /etc/hosts be used to resolve domain names instead of "resolver"?

Can /etc/hosts be used instead of resolver when using proxy_pass? I need to perform a proxy_pass to the same nginx machine. Is there a way to resolve the domains using the machine's /etc/hosts file instead of specifying a DNS server thru the…
Ianthe the Duke of Nukem
  • 1,721
  • 2
  • 20
  • 37
36
votes
1 answer

Difference between X-Forwarded-For and X-Real-IP headers

I'm using Nginx as a reverse proxy. What is the difference between these headers: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; In some documents/tutorials I see both are used, in others…
lonix
  • 14,255
  • 23
  • 85
  • 176
36
votes
2 answers

NGINX - Reverse proxy multiple API on different ports

I have the following API(s): localhost:300/api/customers/ localhost:400/api/customers/:id/billing localhost:500/api/orders I'd like to use NGINX to have them all run under the following location: localhost:443/api/ This seems very difficult…
Proximo
  • 6,235
  • 11
  • 49
  • 67
35
votes
2 answers

Nginx reverse proxy error:14077438:SSL SSL_do_handshake() failed

So i am using following settings to create one reverse proxy for site as below. server { listen 80; server_name mysite.com; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; root…
Muaaz Rafi
  • 1,469
  • 2
  • 15
  • 23
35
votes
7 answers

Can nginx be used as a reverse proxy for a backend websocket server?

We're working on a Ruby on Rails app that needs to take advantage of html5 websockets. At the moment, we have two separate "servers" so to speak: our main app running on nginx+passenger, and a separate server using Pratik Naik's Cramp framework…
John Reilly
  • 1,790
  • 2
  • 17
  • 18
34
votes
3 answers

How to use NGINX as forward proxy for any requested location?

I am trying to configure NGINX as a forward proxy to replace Fiddler which we are using as a forward proxy. The feature of Fiddler that we use allows us to proxy ALL incoming request to a 8888 port. How do I do that with NGINX? In all examples of…
Arman Bimatov
  • 1,789
  • 4
  • 24
  • 31
34
votes
5 answers

How to log real client ip in rails log when behind proxy like nginx

Problem I have a rails 3.2.15 with rack 1.4.5 setup on two servers. First server is a nginx proxy serving static assets. Second server is a unicorn serving the rails app. In Rails production.log I always see the nginx IP address (10.0.10.150) and…
cbliard
  • 7,051
  • 5
  • 41
  • 47