Questions tagged [nginx]
Nginx ("eNgine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.
17,451 questions
0 votes
0 answers
45 views
Get 404 error for rewrite URL with query string
I cannot change my URL e.g. /dfdrgr.php?page=dfgfg to /rrrr. I’ve a .txt file contained e.g. /rrrr /dfdrgr.php?page=dfgfg; and a redirected.map file contained: # Redirects map file – auto generated ...
0 votes
0 answers
45 views
Configure NGINX to only use quantum safe ciphers
OpenSSL 3.5 supports "Hybrid ML-KEM" in TLS 1.3 to avoid "Harvest now, decrypt later" attacks, when Quantum Computers are capable of defeating the encryption in the future. For ...
1 vote
0 answers
47 views
Slow upload speed when when request buffering is off on a kubernetes nginx ingress
I have a Nginx Ingress in Kubernetes that serves large requests (up to 500MB) from the public internet. When I disable request buffering nginx.ingress.kubernetes.io/proxy-request-buffering: "off&...
0 votes
1 answer
103 views
nginx, how to serve different headers for specific client IPs?
As title, we have an usecase where we need to serve "Content-Security-Policy" header or "Content-Security-Policy-Report-Only" header depending on the client IP, internal teams will ...
0 votes
0 answers
93 views
Cache key for auth_request in case of mTLS
I'm using auth_request to use an external process to authenticate the client certificate in a mTLS with. The code is something similar to this: http { # ... http configuration ... server { ...
-1 votes
1 answer
220 views
Configure HTTP/3 on Debian 13 and Nginx 1.26.3
I'm configuring HTTP/3 on Nginx setup: server { ..... ## Enable HTTP/2 listen 443 ssl; http2 on; ## Enable HTTP/3 listen 443 quic reuseport; http3 on; add_header Alt-Svc 'h3=":...
0 votes
1 answer
137 views
Can't connect to any port aside from nginx ones
I have an Ubuntu server (5.15.0) which is used for personal web app mostly. The problem I can't really wrap my head around is: I can't connect to any app listening on any port except those I have in ...
-1 votes
0 answers
107 views
Pi-Hole Can't Use HTTPS With Nginx
Why can't PiHole connect with my nginx reverse proxy? I log into https://dns.thearknet.me/admin and it defaults back to HTTP. All of my other servers can get HTTPS using the Nginx server and ...
2 votes
1 answer
237 views
How is nginx location selected when / is not defined
Nginx location block related question. I have defined the following basic configuration in nginx.conf file events { worker_connections 1024; } http { server { listen 80; ...
0 votes
0 answers
70 views
nginx got "Segmentation fault (core dumped)" 2 times
I would like to make nginx reload periodically. However, after many times of observation, I realized after second reload, nginx always got "Segmentation fault (core dumped)" and stopped ...
0 votes
0 answers
85 views
I want to create an "HTTPS proxy cache server" with nginx that controls large size of git source
I'm a newbie in nginx and proxy server. We have a problem when accessing googlesource, we are receiving a 429 Error due to too many requests and bandwidth usage, increasing the time to get ...
0 votes
0 answers
34 views
Is there a way to prevent docker nginx workers from being able to edit nginx template output files?
I've been playing around with the environment variable replacement functionality in Nginx's official docker image so that a gateway can easily be deployed across multiple kubernetes environments. From ...
0 votes
2 answers
217 views
iptables refuse to block banned traffic (fail2ban)
I am having issues getting iptables to block traffic fail2ban successfully. f2b puts the correct IP address in the correct f2b CHAIN, but those "blocked" IP addresses are not being REJECTed, ...
3 votes
1 answer
397 views
Denying access to a nginx web folder
I am running a webserver through nginx/1.22.1 and I am trying to deny access to any request containing "/lockedFolder/" with: location ~* /lockedFolder/* { deny all; } ...
0 votes
0 answers
33 views
Azure Container App Nginx Proxy 422 Invalid Response Error
I have an Azure Container App that is running Nginx as a Proxy to an API Server server { listen 80; server_name _; root /var/www/html; access_log /var/www/html/access.log; ...
0 votes
1 answer
158 views
How config nginx for a WEB site and a sub url of this WEB site
I currently migrate from IIS to an Debian Nginx server. The main site test.country-radio.eu works in general, but the TYPO3 part required more debugging. And for this debugging I would need PHPmyadmin....
0 votes
1 answer
210 views
Nginx Request Rejected By Cors Check
I am attempting to log into my Copyparty file storage server with the Nginx reverse proxy. The following result displays. Copyparty Login Results rejected by cors-check URL: I understand this is a ...
0 votes
1 answer
195 views
Redirecting Heroku django app using nginx not working
I have a Django app hosted on Heroku. It runs via nginx & Gunicorn. Here is my Procfile: web: bin/start-nginx gunicorn --bind unix:/tmp/nginx.socket --pid /tmp/app-initialized config.wsgi ...
3 votes
1 answer
403 views
Nginx serving wrong vhost/servername
I have 3 vhosts serving different domain all listening on 443: 00-vhost.conf : *.staging.a.com 01-vhost.conf : xx.a.com 02-vhost.conf : *.a.com So my issue is when the vhost for *.staging.a.com is ...
0 votes
1 answer
101 views
[Fedora][SELinux] How to enable access between Nginx and Docker container? [duplicate]
Disclaimer: I'm no devops, so please tell me if I'm doing this wrong. I have a webapp in a container. I use Podman and Podman Compose to bring it up. In compose.yml, I expose the port 5000 and bind it ...
0 votes
2 answers
112 views
Nginx configuration with nginx-auth-jwt
I'm trying to configure Nginx + nginx-auth-jwt (from alpine registry) with the multiple locations: / serving React application 3 REST APIs each with auth_jwt &...
0 votes
1 answer
158 views
how to prevent cloudflare from stripping access-control-allow-origin response header?
I'm configuring nginx to serve static images, I want to make it available for other domains, and tried adding this directive on location block: add_header Access-Control-Allow-Origin *; I tested in ...
0 votes
0 answers
40 views
Nginx header with version [duplicate]
Hello Guys we are using nginx open source from amazon repository I removed the version header but still the nginx name showing as it is can any one know how to remove the nginx name we have amazon ...
0 votes
1 answer
193 views
nginx rewrite remove all arguments from uri
I've been spinning my wheels for a month on the following problem. Nothing I have tried from reading lots of answers from here and on stack exchange about rewriting queries has worked. Google has ...
0 votes
0 answers
147 views
Podman Container Issue - Apache2/Nginx Web Server 403 Forbidden
I’ve been encountering a very curious issue with a Podman container, and I’ve been trying to resolve it for days now. I want to run Container (1) with a web server (Apache2/httpd) on a VM. I forward ...
0 votes
1 answer
92 views
More issues with NGINX reverse proxy
For the life of me, I cannot seem to get my NGINX reverse proxy server working for virtual hosts. And before anyone tells me to use NPM, I'm already using it; however, the server is (1) virtual, (2) ...
0 votes
0 answers
216 views
AWstats on Nginx with multiple virtual hosts
I got awstats set up on Ubuntu with Nginx, and it is now reading the log files and generating statistics. However it is combining multiple sites into one set of stats, even when using the ?domain.com ...
1 vote
0 answers
139 views
is it necessary to recreate the image to have the right level of log?
I’m running php-fpm and nginx in the same image, both managed by supervisord.conf, and deploying that image to a Kubernetes cluster. Our team wants php-fpm—and especially nginx—logs to go to stdout ...
0 votes
0 answers
153 views
Nextcloud All in One Returns 502 Bad Gateway error
I am using 1Panel to manage Docker containers which utilizes Openresty 1.21.4.3-3-3-focal for the reverse proxy server. I have used the following compose.yml services: nextcloud-aio-...
0 votes
1 answer
174 views
Add rule to IPTables when also running Fail2ban
I'm running a nginx web-server on a Raspberry Pi 4b running Bookworm. It seems to be running fine and IPTables/Fail2Ban seem to be catching potentially malicious traffic with my rules/jails. Recently ...
1 vote
1 answer
216 views
Hugo Performance: Thousands of post subdirectories within public directory
I'm going to host a lot of Hugo posts as page bundles(directories) on a ZFS filesystem on a FreeBSD machine. So there's going to be 100,000 directories(page bundles consist of images and an index.md ...
1 vote
1 answer
493 views
Nginx not setting Access-Control-Allow-Origin on cross domain fetch request
I'm struggling with some Nginx/CORS configuration that had been working for a few months but has stopped recently. I have three domains: an API at api.example.com and two frontends at auth.example.com ...
1 vote
1 answer
98 views
NGINX can't resolve upstream name from it's own config
I have a MarkLogic cluster set up in docker and I wanted to add nginx as a load balancer so I can access all hosts on the same ports. The basic configuration doesn't work, when I try to access http://...
3 votes
0 answers
88 views
Nginx responds on private IP but not on public IP in AWS EC2
I have an Nginx server in EC2. It's in a VPC on a public subnet that's attached to an internet gateway. The security group is configured to allow traffic on port 80 and 443. The instance is running on ...
1 vote
0 answers
94 views
Increasing net.netfilter.nf_conntrack_max leads to unavailable server
We are running debian bullseye kernel-5.10.0-35-amd64 with 2 10G NICs and one smaller NIC which is unused: 01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection ...
1 vote
1 answer
118 views
How to configure Nginx reverse proxy with Docker for nopCommerce to work with HTTPS?
Where this question can be asked May be server fault? I’m running a nopCommerce ASP.NET Core application using Docker containers on Linux. Setup: nopCommercecontainer (ASP.NET Core app, exposed on ...
1 vote
1 answer
172 views
Nginx: Need help figuring out slowdown or possible bot attack
I've been noticing a slowdown over the last week. There doesn't seem to be a ton of traffic on Google Analytics, but there seems to be a ton of unique IP addresses hitting the site. I have about 20 ...
0 votes
1 answer
100 views
How to enforce VPN access on HTTPS with Nginx passthrough while SSL is terminated on backend?
I have an Nginx reverse proxy gateway forwarding traffic to a backend host running a website and PHP apps. The backend terminates SSL (certs are managed there), and the gateway currently uses stream ...
0 votes
0 answers
200 views
Nginx NTLM and Exchange/Outlook logon fails
I have Exchange 2019 -> Nginx -> Internet. Nginx is self compiled with "more headers" and "nginx-ntlm" modules. I've looked at all available posts here, other places and 3 ...
0 votes
1 answer
96 views
Can't see repositories on nginx/cgit
I am using Ubuntu 22.04 for server. I installed nginx and cgit to get repositories on the web. After setting up, I got homepage working, but no repository is shown. I choosed /var/git directory for ...
4 votes
2 answers
212 views
Digital Ocean - TLS traffic does not end at Load Balancer
I have setup my website infrastructure on Digital Ocean, below are some details of infra HTTPS traffic from Internet going to Load Balancer Kubernetes cluster with 2 nodes, running application pods ...
0 votes
1 answer
80 views
How to safely add a header with $uri?
on nginx, i want to add a header with the clean path requested. for example: https://example.com/some/path?asdf=1, should set x-path: /some/path header. I would like to avoid header injections, etc. (...
0 votes
0 answers
150 views
How to change PHP's $_SERVER['SERVER_PORT'] on Apache, behind an Nginx reverse proxy?
I set up Nginx and Apache2 on the same machine with Nginx functioning as a reverse proxy. Nginx uses SSL (at least for 1 of 2 domains: example.com), Apache is used for handling PHP using FPM/FastCGI. ...
0 votes
0 answers
83 views
nginx ProxyPass not working as expected
I have a backend that serves content over different ports. My goal is to configure Nginx to redirect requests based on the URL path. The problem occurs when I try to access domain.com/manager (the ...
0 votes
0 answers
108 views
Nginx - 302 redirect not working if the URI with more than one subpath
I am using Nginx version 1.25. I am having the Nginx config as below. # on alpine, copy to /etc/nginx/nginx.conf worker_processes auto; error_log /...
0 votes
1 answer
254 views
Django app is not working as expected when using subdomains
I have a website at cerulinux.com that works great. But then I introduced subdomains. You click on the link for the page you want to have your subdomain pointed to, it shows the subdomain in the URL ...
0 votes
1 answer
180 views
Is using map in conjunction with proxy_pass like this a good idea?
Learning that one should not use if inside location statements got me to rethink and redo my nginx config. I got an excellent answer on how I can properly use error_page to display a custom error page ...
0 votes
1 answer
216 views
Clear Cloudflare TXT Records
I have attempted to register a certbot certification for a long time. Many TXT acme challenges have been attempted with 100% failure. I checked my latest TXT record with DNS checker for my domain ...
0 votes
1 answer
131 views
nginx serve the same image for all image requests that start with a specific string
How to configure NGINX virtual host (vhost) to serve the same image (/images/game-board.png) for all image requests that start with a specific string like /images/game-board-? Example: For these image ...
4 votes
1 answer
419 views
Why are requests not processed with the error page handler location?
I have nginx with a protected reverse proxy to a local IP: server { server_name protected.example.com; client_max_body_size 100M; listen 0.0.0.0:443 ssl; ssl_certificate /path/to/...