Questions tagged [nginx-reverse-proxy]

283 questions
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
  • 1
  • 2
3
votes
2 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
  • 511
  • 5
  • 21
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
  • 2
3
votes
4 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
  • 275
  • 1
  • 4
  • 10
2
votes
1 answer

Generate self-signed certificate for Firefox to accept

I'm setting up an internal testing network, and I want FireFox to accept my self-signed certificates. Specifically, I'm trying to configure a certificate for nginx so I can use MyTestNetwork.dev and *.MyTestNetwork.dev. Here is how I'm generating my…
2
votes
1 answer

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
  • 35
  • 5
2
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
  • 157
  • 1
  • 6
2
votes
1 answer

Handling multiple location proxy blocks in single nginx config file

Completely new to nginx, coming from Apache. I have a simple multiple proxy to nodejs setup put together from a few online resources and the config looks like this: server{ listen 80; server_name dev1.domain.net; proxy_set_header…
John C
  • 23
  • 3
2
votes
1 answer

Nginx reverse proxy through wireguard tunnel

I set up a wireguard tunnel between an AWS instance (acting as server) and a personal computer acting as client. Wireguard is installed on both in a docker container (using linuxserver image). On the local computer I have a website that I would like…
Rickj
  • 23
  • 1
  • 5
2
votes
1 answer

NGINX not Serving Image Files Properly

I have set up a django website that would be served by Nginx, everything was working perfectly not until images stopped showing recently. I tried inspecting the possible cause of this strange development using curl and then realized that the…
Ruby
  • 71
  • 1
  • 10
2
votes
1 answer

Is it possible to set proxy header in NGINX using variable for the *header name*?

According to the NGINX documentation proxy_set_header field value allows redefining or appending fields to the request header passed to the proxied server. The value can contain text, variables, and their combinations. So I can do set $my_variable…
1
vote
0 answers

How to configure Nginx to proxy more than 200K MQTT connections?

I need to proxy a lot of MQTT connections (over 200K) and distribute them over a number of ports at the backend server. Below is my Nginx configuration. load_module /usr/lib/nginx/modules/ngx_stream_module.so; user www-data; pid…
1
vote
1 answer

Nginx: rewriting while checking args format with a regex

I have an API endpoint like /my/api/PARAM1/abcd?arg1=val1&arg2=val2, and use a redirect to proxy to a fastcgi server elsewhere (using upstream). Basically I have the current configuration : location ~ "^/my/api/(?[A-Z0-9]+)?$" { …
1
vote
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
  • 11
  • 2
1
vote
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…
1
2 3
18 19