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
1923
votes
21 answers

What's the difference between a proxy server and a reverse proxy server?

What is the difference between a proxy server and a reverse proxy server?
Vicky
218
votes
12 answers

Proxy with express.js

To avoid same-domain AJAX issues, I want my node.js web server to forward all requests from URL /api/BLABLA to another server, for example other_domain.com:3000/BLABLA, and return to user the same thing that this remote server returned,…
user124114
  • 8,372
  • 11
  • 41
  • 63
212
votes
11 answers

Nginx reverse proxy causing 504 Gateway Timeout

I am using Nginx as a reverse proxy that takes requests then does a proxy_pass to get the actual web application from the upstream server running on port 8001. If I go to mywebsite.example or do a wget, I get a 504 Gateway Timeout after 60…
Dave Roma
  • 2,449
  • 3
  • 18
  • 13
171
votes
7 answers

API gateway vs. reverse proxy

In order to deal with the microservice architecture, it's often used alongside a Reverse Proxy (such as nginx or apache httpd) and for cross cutting concerns implementation API gateway pattern is used. Sometimes Reverse proxy does the work of API…
user1459144
  • 4,439
  • 5
  • 28
  • 35
157
votes
8 answers

Error during SSL Handshake with remote server

I have Apache2 (listening on 443) and a web app running on Tomcat7 (listening on 8443) on Ubuntu. I set apache2 as reverse proxy so that I access the web app through port 443 instead of 8443. Besides, I need to have SSL communication not only…
user2791481
  • 1,671
  • 2
  • 12
  • 4
110
votes
4 answers

nginx - read custom header from upstream server

I am using nginx as a reverse proxy and trying to read a custom header from the response of an upstream server (Apache) without success. The Apache response is the following: HTTP/1.0 200 OK Date: Fri, 14 Sep 2012 20:18:29 GMT Server: Apache/2.2.17…
luis
  • 1,849
  • 3
  • 16
  • 17
96
votes
3 answers

How to serve all existing static files directly with NGINX, but proxy the rest to a backend server.

location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; if (-f $request_filename) { access_log off; expires 30d; …
fmalina
  • 6,120
  • 4
  • 37
  • 47
71
votes
1 answer

How to enable CORS in Nginx proxy server?

As my title, here is the config file located in conf.d/api-server.conf server { listen 80; server_name api.localhost; location / { add_header 'Access-Control-Allow-Origin' 'http://api.localhost'; add_header…
qwang07
  • 1,136
  • 2
  • 11
  • 20
63
votes
3 answers

Apache reverse proxy with basic authentication

Trying to configure my reverse proxy with basic authentication before forward the traffic to my back end server. Can any one give me a solution. Example here: User(internet) -> reverse proxy / vhosts server (need to add basic authentication here )…
Vincent P
  • 761
  • 1
  • 5
  • 6
52
votes
5 answers

How to redirect on the same port from http to https with nginx reverse proxy

I use reverse proxy with Nginx and I want to force the request into HTTPS, so if a user wants to access the url with http, he will be automatically redirected to HTTPS. I'm also using a non-standard port. Here is my nginx reverse proxy config:…
rbinsztock
  • 3,025
  • 2
  • 21
  • 34
45
votes
2 answers

How to record reverse proxy upstream server serving request in Nginx log?

We use Nginx as a reverse proxy with this setup: upstream frontends { server 127.0.0.1:8000; server 127.0.0.1:8001; server 127.0.0.1:8002; [...] } server { location / { proxy_pass…
Pol
  • 3,848
  • 1
  • 38
  • 55
44
votes
3 answers

Advantages of a reverse proxy in front of Node.JS

What are the advantages of having nginx or another web-server running as a reverse-proxy in front of the Node.JS? What does it provide? (This question is intended for matters concerning web-apps, not web-pages). Thank you.
Phil
  • 13,875
  • 21
  • 81
  • 126
44
votes
4 answers

HAProxy + WebSocket Disconnection

I am using HAProxy to send requests, on a subdomain, to a node.js app. I am unable to get WebSockets to work. So far I have only been able to get the client to establish a WebSocket connection but then there is a disconnection which follows very…
Ross
  • 14,266
  • 12
  • 60
  • 91
43
votes
2 answers

Nginx: when to use proxy_set_header Host $host vs $proxy_host

I've been reading up on reverse proxying and am wondering when proxy_set_header Host $host is appropriate over proxy_set_header Host $proxy_host. I did some research and in this article it says that in most cases we set Host to $host. Then why does…
Alex
  • 3,441
  • 4
  • 18
  • 30
43
votes
3 answers

What's the de facto standard for a Reverse Proxy to tell the backend SSL is used?

I have a reverse proxy that does HTTPS on the outside, but HTTP on the inside. This means that by default in-app URLs will have HTTP as the scheme, as this is the way it's being contacted. How can the proxy tell the backend that HTTPS should be…
Chris Wesseling
  • 6,226
  • 2
  • 36
  • 72
1
2 3
99 100