Questions tagged [nginx-reverse-proxy]

When a reverse proxy proxies a request, it sends the request to a specified proxied server (http or other), fetches the response, and sends it back to the client, as if it came from the reverse proxy itself.

More information: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

2738 questions
333
votes
16 answers

upstream sent too big header while reading response header from upstream

I am getting these kind of errors: 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header while reading response header from upstream, client: 107.21.193.210, server: aamjanata.com, request: "GET…
Vidyut
  • 3,489
  • 2
  • 13
  • 10
81
votes
3 answers

Nginx TCP forwarding based on hostname

With the release of TCP load balancing for the Nginx community version, I would like to mix OpenVPN and SSL pass-through data. The only way for Nginx to know how to route the traffic is via their domain name. vpn1.app.com ─┬─► nginx at 10.0.0.1…
James Wong
  • 4,529
  • 4
  • 48
  • 65
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
7 answers

How to run NUXT (npm run dev) with HTTPS in localhost?

EDIT: Updated the text in general to keep it shorter and more concise. I am trying to configure HTTPS when I run npm run dev so I can test MediaStream and alike locally (for which browsers require me to provide HTTPS). I am trying to configure it…
PedroD
  • 5,670
  • 12
  • 46
  • 84
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
32
votes
4 answers

Nginx SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share

I got this error in nginx error log: SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking I use Let's Encrypt currently. Any ideas to solve this problem? Thank you, guys.
Justin
  • 481
  • 1
  • 6
  • 11
31
votes
5 answers

X-Frame-Options in nginx to allow all domains

I'm using nginx as a reverse proxy for my website. I want to be able to open my website in an iFrame from a chrome extension new tab html file. For this, I need my nginx to set X-Frame-Options to allow all domains. According to this answer, all…
Mallika Khullar
  • 1,725
  • 3
  • 22
  • 37
20
votes
2 answers

502 Bad Gateway - NGINX no resolver defined to resolve

I have created a proxy pass for multi URLs. listen 80; listen [::]:80; server_name ~^(.*)redzilla\.11\.75\.65\.21\.xip\.io$; location / { set $instname $1; proxy_pass…
20
votes
4 answers

Gateway timeout with Spring cloud gateway and Nginx as reverse proxy

I created an API gateway for my application and it will act as a front controller for other microservices. In my production setup I use Nginx as a reverse proxy for my gateway The API gateway is running on port 8080 Nginx configured as…
Nitin
  • 2,701
  • 2
  • 30
  • 60
19
votes
2 answers

Angular App running on nginx and behind an additional nginx reverse proxy

I'm currently trying to create a reverse proxy for two Angular apps. I want the apps to be both accessible through the 443 port of the docker host with SSL enabled (like https://192.168.x.x/app1 and https://192.168.x.x/app2), so that the users don't…
16
votes
0 answers

Reverse proxy with keepalive and re-resolve DNS according to TTL in nginx

Upstream blocks in nginx open source allow you to enable keepalive connections to reverse-proxied servers (docs: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive). Syntax: keepalive connections; Default: — Context:…
Nick Meyer
  • 1,771
  • 1
  • 17
  • 29
16
votes
4 answers

Nginx: In which order rate limiting and caching are executed?

I want to use nginx for rate limiting and caching. In which order nginx applies them? In other words, is it limiting only request to the upstream server or all requests (including cache HIT's)? How can this order be changed? I think it can be…
Anton
  • 442
  • 4
  • 19
15
votes
1 answer

Nginx, how to start service with ngx_http_sub_module enabled

How to start Nginx as service with this module? According to this documentation, it says: This module is not built by default, it should be enabled with the --with-http_sub_module configuration parameter. I don't understand where to enter this…
Mr.D
  • 7,353
  • 13
  • 60
  • 119
14
votes
1 answer

Flask SERVER_NAME setting best pratices

Since my app has background tasks, I use the Flask context. For the context to work, the Flask setting SERVER_NAME should be set. When the SERVER_NAME is set the incoming requests are checked to match this value or the route isn't found. When…
14
votes
1 answer

Fallback NGINX location

I’m new to NGINX and I am migrating a server. I haven’t finished everything on the new server, so I want it to match to the new server, unless that resource or path doesn’t exist. If so, I want to send it to the old server. Is there way to do that?
dkimot
  • 2,239
  • 4
  • 17
  • 25
1
2 3
99 100