Questions tagged [nginx-reverse-proxy]
The nginx-reverse-proxy tag has no summary.
209 questions with no upvoted or accepted answers
4 votes
0 answers
2k views
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:...
4 votes
0 answers
636 views
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 ...
4 votes
0 answers
5k views
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 ...
3 votes
0 answers
825 views
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 ...
3 votes
1 answer
17k views
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 ...
3 votes
2 answers
15k views
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 ...
3 votes
0 answers
10k views
Using Nginx upstream hosts with proxy_pass
Below is the bare-bones stripped down Nginx config that demonstrates the problem I'm having directly. The "real-world" setup has multiple upstreams and multiple conditional checks that are ...
3 votes
1 answer
962 views
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. ...
2 votes
1 answer
924 views
SMTP Port 25 Issue on Nginx Mail Proxy
I set up an Nginx mail proxy server and configured it to distribute to several mail servers as a front-end server. However, I need to open port 25 in the configuration; otherwise, I cannot receive ...
2 votes
0 answers
790 views
100 concurrent requests to a Django-App with Gunicorn lead to "54: Connection reset by peer" and 502's
I'm hosting a Django-App which serves as an API-Endpoint. Unfortunately the App which uses the API does a lot of concurrent requests on page-load (in the realm of 80-90 requests). Nginx is running as ...
2 votes
2 answers
1k views
Nginx UDP proxy shared connection is busy
We are proxying UDP packets for a game server through a Nginx reverse proxy. Clients timeout very often because the Nginx can't handle the requests. Initially it works flawlessly, but when more ...
1 vote
0 answers
256 views
Openshift nginx proxy_pass not redirecting from current host to another
This is my DockerFile FROM docker-enterprise.net/developers-nginx/nginx1.22/rhel8/nginx-rhel8:latest USER root RUN mkdir /.ionicsecurity && \ chmod 775 /.ionicsecurity && \ ...
1 vote
0 answers
1k views
Docker private registry: got 400 bad request when docker push
I'm trying to build a private docker registry on my server. I made a docker-compose project using registry image. Nginx is used for reverse proxy from hub.topfyf.cn to localhost:5000. I tried docker ...
1 vote
0 answers
258 views
NGINX Rate Limiting Configuration Leading to 404 Error for Specific Route in Plesk-Managed CakePHP App
I'm using Plesk 18 with NGINX as a proxy in front of Apache2 for a CakePHP application. I have set up rate limiting in my NGINX configuration (/etc/nginx/nginx.conf) with limit_req_zone $...
1 vote
1 answer
122 views
Non https requests getting redirected to 302 while making api call from client side, even https requests go to 302
Any Request made from API client to server giving 302 for exmaple https://app.ardracloud.com/api/deviceconnect or http://app.ardracloud.com/api/deviceconnect returns 302 server { listen 66.66....
1 vote
1 answer
1k views
Can't get nginx resolver to work
I'm facing issue with nginx when a container in network change his IP , i can access it in Linux OS But nginx didnt resolve the new IP... I searched alot about a solution and i see that nginx tell us ...
1 vote
0 answers
3k views
nginx proxy manager: not resolving https but http works
I have a little home network with pihole on 192.168.0.3 and a small home server on 192.168.0.41. On the home server, I run a few services, such as dashy, gogs (in docker containers), and I also have a ...
1 vote
0 answers
535 views
Unable to redirect HTTPS to HTTP via NGINX
I'm having a very hard time doing a redirect from HTTPS to HTTP. This is giving me the last few days some headache because I can't figure it out :| situation I have a website and a VPS server. The ...
1 vote
0 answers
521 views
Nginx Multiple rate limiting using incoming header $http_q
I have a rate limit config as follows in the http block: # Rate limit config declaration map $http_q $r_b001 { b001 "1"; } # Zone config limit_req_zone $r_b001 zone=b001:100m rate=...
1 vote
1 answer
2k views
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/...
1 vote
1 answer
1k views
Access docker compose containers from host NGINX via reverse proxy
I am facing this issues I am not able to solve by anything I´ve found on this site or anywhere else. Lets assume I have a domain and Debian server with NGINX installed on it as main gateway for web ...
1 vote
0 answers
7k views
SSL_do_handshake() failed warning on nginx (error 0A000412)
I have a nginx server functioning as a reverse proxy. It is sat behind Cloudflare. The website is functioning fine (there are no errors on the browser), but there are lots of warnings in the logs like ...
1 vote
1 answer
213 views
nginx with subdomains and two servers
I have two servers: the first one has the IP address 192.168.1.216 and is configured with the hostname hub.domain.tld (jupyterhub). The DNS record is pointing to the public IP address, and all ...
1 vote
1 answer
2k views
map nginx $request_uri to port
I want to create a map between nginx $request_uri and $port I have many location and each location works with its own port. for example I have: location /path1 { proxy_pass 127.0.0.1:10000 } ...
1 vote
0 answers
1k views
Nginx proxy allow specific ip to access server not working
I have an nginx reverse proxy for multiple domains one of which i want to restrict access to unless connected to VPN. So i have added allow for the vpn ip addresses for this one particular server and ...
1 vote
0 answers
764 views
nginx reverse proxy: hide client identity and IP address for wix
This is my first post in this community. I am hosting a website in Wix and want to restrict access to a certain number of individuals. In addition, I want everyone to pass my nginx-reverse proxy ...
1 vote
0 answers
431 views
Nginx - transparently redirect traffic into another server block
I have a NGINX configuration with two virtual hosts (server {} blocks): one serving a human-readable site on the primary domain, and the other acting as a reverse-proxy for a specialized service on a ...
1 vote
0 answers
4k views
Modify the `Host` header or pass `X-Forwarded-Host` instead when using Nginx as reverse proxy?
I'm trying to use Nginx as a reverse proxy and the upstream server is an ASP.NET Core application where I've registered the ForwardedHeadersMiddleware, which will read three different X-Forwarded-* ...
1 vote
1 answer
1k views
Nginx not recognising "user" variable
I have had a dev server set up for quite some time and am in the process of cleaning and setting up a new one. I am running a frontend and three APIs via node.js and nginx. I have never had a problem ...
1 vote
0 answers
62 views
nginx dynamic forwarding requests coming from users
I have a backend application that binds users with server ports (I attribute a random available TCP port to each connected user) Using NGINX, I want to redirect all requests coming from a user -...
1 vote
0 answers
57 views
Nginx Rewrite rules not working for directory
I am trying to write a below rewrite rule but somehow this is not working and I would really appreciate if someone can help me on this? I have a Nginx reverse proxy set and my orignial server IP is ...
1 vote
2 answers
2k views
Node on Nginx - proxy_request_buffering off doesn't work with https? Super slow https image uploads
I have a node server running on nginx as a reverse proxy, which is supposed to handle image uploads. Its ssl cert and domain are configured through cloudflare. Aside from setting the proxy_pass to ...
1 vote
0 answers
167 views
Nginx proxy to variable URL
I'd like to create a reverse proxy that results in the following: /proxy/?url=http://takemehere.com/.... reverse proxy to http://takemehere.com/.... I tried this to no avail: location ~ /proxy/?url=(...
1 vote
0 answers
856 views
Re-writing cookie headers with NGINX not working
I have a working NGINX config as a reverse proxy. I'm trying to modify the upstream server's Cookie headers to add samesite=non and secure. According the to docs here: proxy_cookie_flags it should be ...
1 vote
0 answers
957 views
Cannot reach my external domains when connected to WireGuard VPN?
I have an Unraid server setup with services like WireGuard VPN, Home Assistant, Nginx Proxy Manager. The setup is as follows: WireGuard is running as "Remote tunneled access" with DNS server ...
1 vote
1 answer
4k views
Nginx + Socket.io websocket closed before establishing connection issue
Hi i am running an express server with a socket.io server attached to it const { Server } = require("socket.io"); var server = http.createServer(app); /** * Adding Socket io implementation ...
1 vote
0 answers
188 views
LetsEncrypt HTTPS nginx and systemd service for Jupyter Notebook?
I get no errors in neither /var/log/nginx/{access,error}.log nor the journalctl for jupyter and nginx. Putting it all in an HTTP block works, HTTPS the website never loads (I tried curl -Lvvv 'http://...
1 vote
0 answers
798 views
Dynamic nginx proxy 502 peer closed connection in SSL handshake
does anyone know why am I getting this problem? Basically the connection closes by itself because of dynamic proxy_pass. This is my nginx config. error from log : 2022/08/25 19:45:28 [error] 14208#0: *...
1 vote
0 answers
1k views
Nginx basic_auth for entire site (reverse proxy) except for a "hidden" URL which should access all content without basic_auth
TL'DR set a gibberish URL in nginx site definition that would bypass basic-auth to reverse-proxy More details: I have a setup with Grafana running on a VPS and an nginx reverse proxy directing towards ...
1 vote
2 answers
1k views
nginx reverse proxy returning 404 for some HTTP requests (but not all)
So I have configured a reverse proxy using nginx 1.18.0. I am able to access my desired website through the reverse proxy already, but some requests are failing (eg. for the favicon), because the ...
1 vote
1 answer
902 views
Use NGINX as a reverse proxy for Object storage to serve WEBP conditionally
I'm using a location config like this in Nginx for serving WEBP when the user supports it map $http_accept $webp_suffix { default ""; "~*webp" ".webp&...
1 vote
0 answers
3k views
Nginx proxy don't work for localhost on port 81 - Always 502 (bad gateway)
I have a simple web application running in a docker container and exposed on port 81. curl http://127.0.0.1:81 returns the index.html of that web app. So it is running and is reachable. Also localhost ...
1 vote
0 answers
1k views
Poor server performance with nginx gzip
I enabled gzip on my nginx reverse proxy which is hosted on EC2 free tier (so lightweight server). I noticed that my request latency increased by almost 2x (13+KB compressed to 4+KB). The only issue ...
1 vote
2 answers
28k views
Authorization Header Missing Upon NGINX Proxy Pass to subdomain
Hi I'm running Laravel on NGINX server and I would like to use NGINX reverse proxy capability as an API gateway for my Laravel and other node API application. Here are my configurations: Application ...
1 vote
0 answers
1k views
How to pass an html site from another server via nginx reverse proxy?
I am trying to load an Angular app from another internal service when calling localhost:81/internal?pageId=10. But all that happens is that nginx redirect me in the browser to localhost:80. I have ...
1 vote
1 answer
2k views
getting 412 precondition failed with ngx_cache_purge when trying to purge cache
I am new to this and just started using nginx for my pet projects. now i would like to install and use ngx_cache_purge module from https://github.com/nginx-modules/ngx_cache_purge, since it has some ...
1 vote
0 answers
781 views
Does Nginx combine all cached slices to make one file as in backend?
I am using the Nginx slice module to fill the cache for big files as shown here https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/ Here is a sample configuration location / { ...
1 vote
0 answers
1k views
wordpress page, post url on nginx inside docker container automatically redirect to root domain with 301 status
I have successfully setup a wordpress site running on a dockerized nginx. When the wordpress site is up and running, I can go to the home page: https://my_domain.com or any links or at after wp-admin/....
1 vote
0 answers
2k views
Nginx proxy_pass root to external landing page
For a new domain x.co I am setting up, I want the root (x.co) to show an external landing page without changing the url to that of the external landing page. This landing page has been created on ...
1 vote
0 answers
306 views
proxy_pass to different URLs in nginx
I want to create a reverse proxy under one location for two different upstreams. Upstreams are so different that they have different prefixes in URL, but the rest is the same. https://foo.example.com/...