Questions tagged [nginx-reverse-proxy]
334 questions
7
votes
5 answers
How can I get nginx not to override x-forwarded-for when proxying?
I have an nginx server behind a load balancer, the nginx server passes requests on to a variety of services, but in this case a docker container running apache. The load balancer sets an X-Forwarded-For correctly, but by the time it gets to the…
Aquarion
- 315
4
votes
2 answers
How can I forward-proxy https requests with Nginx?
I am running a local web app on my dev machine. And I want to reach my local web app from a test machine (a phone).
I set up Nginx to listen on port 8888. My test machine can reach my dev machine at this port.
Requests that should go the local web…
jlanssie
- 51
4
votes
2 answers
Use ports other than 80 and 443 on Cloudflare
I have an issue where I can't use ports 80 and 443 for my website/services because these are already taken on the router. I don't have control over, can't change it or put a reverse proxy in there so I am forced to use different ports. I found that…
Gerge
- 75
4
votes
1 answer
How can I set up an nginx reverse proxy combined with try_files?
I'd like to call a named location which handles a reverse proxy directive. So I've tried the following lines in my virtual host section:
upstream node_upstream {
server 127.0.0.1:8000;
keepalive 64;
}
server {
server_name…
LongHike
- 177
4
votes
0 answers
Performance, Security and Scalability of nginx proxy vs ssh tunnel
I'm wondering about the difference in performance, security and scalability for nginx and ssh tunnel for a web application.
For my case, I have a VPS set up, whos only job is to forward the traffic to my home router. This traffic travels between the…
Typewar
- 199
- 1
- 3
- 14
4
votes
0 answers
NGINX 502 Bad Gateway error inside Docker container
I haven't had any issues with my Docker container or NGINX until today where I am getting a random unexpected 502 Bad Gateway error even though I have made no changes to my configuration files, Docker files, or any other file in my project.
The 502…
CrashV24232
- 41
3
votes
0 answers
Safest way to configure `max_fails` in Nginx reverse proxy
We have nginx as a reverse proxy, load balancing across 2 application servers. These application servers were defined in upstream blocks like so:
upstream app_backends {
server 1.1.1.1:8080 max_fails=1 fail_timeout=120s;
server…
Robin Winslow
- 259
3
votes
0 answers
broken symlinks in nginx modules-enabled, /usr/lib/nginx and /usr/share/nginx/modules-available missing
For almost two years now I have been running a simple nginx reverse proxy on a Debian instance to serve dockerized services. In case any configuration changes go wrong, I am also using git version control for all important, non-default (manually…
Frederik Hoeft
- 131
3
votes
1 answer
Certbot failed to authenticate some domains (authenticator: nginx)
Im running nginx as reverse proxy and for some reason im unable to renew letencrypt certificate, i have tried to upgrade nginx and certbot to latest version. It has worked before and im not sure if some server configuration have been changed.
When…
Pim
- 31
3
votes
2 answers
What's the right way to configure Nginx for MinIO server running as a docker service
I am just trying to proxy pass from Nginx to Docker Minio service; however, with my current nginx config file, it's not working as expected and keeps loading when I browse any Minio buckets from the Minio console (web interface). Note that the minio…
RAFIQ RANA
- 31
- 1
- 1
- 2
3
votes
1 answer
How to use nginx as ssl reverse proxy for postgresql TCP connection?
What I want to achieve is this
[Postgresql Database] -- transparent TCP -- [clients on the cloud]
[Postgresql Database] -- transparent TCP -- [nginx on jump server] --SSL TCP-- [clients outside the cloud]
I would like to add an additional layer of…
George Y
- 618
- 3
- 11
- 20
3
votes
3 answers
Nginx is not handling auth_request before if statement
It's probably easiest to just show by example where I'm hitting issues, so I'll jump right in...
This snippet will work as-is for Nginx with rewrite/auth modules enabled. So hopefully this issue is quick & easy reproduce on pretty much any Nginx…
Rino Bino
- 692
- 13
- 34
3
votes
1 answer
Have NGINX automatically upgrade websocket connections in reverse proxy
I have several services I'm placing behind an NGINX reverse proxy, which was simple enough to setup, but I've run into a problem with websockets. A single endpoint is simple enough to specify with a location that includes
proxy_set_header Upgrade…
directedition
- 309
3
votes
1 answer
Nginx reverse proxy seems to ignore specified port
I have a gitea server listening on public IP 111.222.333.444, port 3000. If I open http://111.222.333.444:3000 on my browser, I can access normally.
I have an nginx server running on 999.888.777.666. I have domain registered, and the DNS specifies…
Pablo M
- 131
3
votes
2 answers
How can I remove an accept-encoding request header in nginx?
The recent update to zlib due to a security hole appears to cause a major problem when serving PHP-FPM 8.0 via nginx on Ubuntu focal. Any requests with a gzip encoding fail right at the start of the response, though nginx logs the requests as…
Synchro
- 3,339
- 6
- 30
- 40