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.

A reverse proxy is a type of server. Unlike a traditional "forward proxy" server, a reverse proxy fetches resources from a specific defined set of servers for a client. The Apache HTTPD server's mod_proxy module is a popular example of software that can be used as a reverse proxy.

A reverse proxy can be used in cases when there is an advantage to not exposing the server with the content directly to the Internet, whether it be for security reasons or because of a lack of available public IP addresses.

3190 questions
7
votes
3 answers

Nginx + php-fpm VS Nginx as a reverse proxy for Apache

Can someone enlighten me whats the advantage of having NginX as a reverse proxy to Apache. People suggest it so that static content is handled by nginx and dynamic content (php files) are handed over to Apache. Wouldn't directly letting…
Ansell
  • 95
  • 1
  • 1
  • 3
7
votes
2 answers

Nginx as reverse proxy for Google App Engine application

I want to use nginx as a reverse proxy for Google App Engine application to support naked domain as described here. If I use this scheme, will all the traffic go through the server that hosts nginx or client will connect to App Engine directly? Can…
7
votes
2 answers

mod_proxy returns 503 errors even after proxied service is back up

I have a setup with Apache2 as a front-end server for multiple python apps served by gunicorn. My Apache2 setup using mod_proxy looks like this: ServerName example.com UseCanonicalName On ServerAdmin…
Benjamin Wohlwend
  • 729
  • 2
  • 7
  • 14
7
votes
3 answers

Only allow ProxyPass for some IP's

With the following snippet, everyone can access both /foo and /bar ProxyPass /foo http://example.com/foo ProxyPassReverse /foo http://example.com/foo ProxyPass /bar http://example.com/bar ProxyPassReverse /bar http://example.com/bar But what if I…
mobmad
  • 183
  • 1
  • 1
  • 6
7
votes
3 answers

Modify response header with nginx

I'm trying to configure nginx as a reverse proxy server for a web application on a back-end Domino server. We have 99.9% working, but that last 0.1% is really bugging me. I'll explain. In some cases, the application returns a partial refresh with a…
D.Bugger
  • 223
  • 1
  • 3
  • 8
6
votes
3 answers

nginx proxy_pass to https

So I would like to proxy_pass requests to an https backend server, however, every time I try to reload nginx server with https:// configured backend I get the following error: nginx: [emerg] https protocol requires SSL support This is the nginx…
joebegborg07
  • 869
  • 5
  • 16
  • 24
6
votes
1 answer

Apache reverse proxy timeout in 60 seconds

I have Apache Reverse proxy server which proxies request to my internal Apache server. I am using Apache version 2.4 on Linux platform. I encountered timeout page and HTTP ERROR 504 whenever back-end Apache server is taking more than 60 seconds (…
Jayesh Labade
  • 61
  • 1
  • 1
  • 4
6
votes
1 answer

worker_connections are not enough - Nginx, docker

In my production server we have several upstreams which are docker containers running behind a reverse proxy with nginx. One of this containers is a mqtt broker (mosquitto) that we use to connect through websockets. This is our nginx.conf…
raven
  • 111
  • 1
  • 5
6
votes
1 answer

Overwrite HTTP headers comming back from a web application server proxied in nginx

I have a web application server reverse-proxied behind nginx 1.15 like so: location / { proxy_pass https://some.awesome.IP:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } add_header…
cis
  • 247
  • 1
  • 2
  • 9
6
votes
2 answers

Private address space IP found in X-Forwarded-For

I'm reverse proxying with nginx behind Google Cloud (HTTPS) Load Balancer, so I add the X-Forwarded-For header so that the backend can extract the client (browser) IP. This morning I noticed a 10.x.x.x IP in the logs, how is this possible?
6
votes
1 answer

Nginx add headers and proxy_pass for CORS bypass

I want to make CORS site with API on proxy_pass server. But location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header…
eri
  • 294
  • 2
  • 5
  • 17
6
votes
1 answer

Nginx - how to enable ssl for PHP when behind a reverse proxy

I have a setup that roughly looks like this (I have tried to simplify this as much as possible): Port 443 - nginx listens and forwards to port 80, config looks something like this server { listen 443 ssl; location / { proxy_pass…
googletorp
  • 173
  • 1
  • 1
  • 8
6
votes
1 answer

Setting nginx reverse proxy with rewrite to apply to all links in site

I have the following Nginx config: server { listen 80; location /test { rewrite /test(.*) /$1 break; proxy_pass "http://www.example.com/"; } } This works well for the home page and when entering 'http://localhost/test'…
adaml
  • 361
  • 2
  • 7
6
votes
3 answers

Nginx Reverse Proxy IP Forwarding for Shopify?

We are making an attempt to make our site more content-driven and while Shopify is a cool ecommerce platform, it's not that great when it comes to content. So we've moved our site from solely on Shopify and put WordPress on an Nginx server. On that…
ipullrank
  • 91
  • 1
  • 6
6
votes
3 answers

Forwarding real remote IP to proxied server with nginx

To hide my website IP I proxied the main server with nginx on another VPS. I am trying to send the visitor real IP to my website and here is my config in conf.d folder: proxy_cache_path /etc/nginx/cacheddata levels=1:2 …
Amin
  • 79
  • 1
  • 2
  • 5