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,120
questions
0
votes
0
answers
22
views
Configuring NGINX to emulate API in PHP
I am trying to emulate an API path to reroute to a PHP script. I'm trying the following configuration (found here), but receiving a 404.
location ~ ^/api/v1/(.*)/?$ {
try_files $uri $uri/ /v1/...
0
votes
1
answer
20
views
Client ssl certificate verify error: 26 unsupported certificate purpose while reading client request header
I am trying to send a search request from web server to another server through nginx proxy. I have server_hostname.pem file as server certificate and ca-chain.cert.pem file as client certificate. ...
-1
votes
0
answers
15
views
Ubuntu - Nginx client cert authentication: is a public CA a security risk?
I am struggling with a Nginx setup as reverse proxy with client certificate authentication. The client is only accepting publicly signed certificates to be imported as client certificates for ...
-1
votes
2
answers
49
views
Seeking guidance on setting up a proxy server with DNS for specific sites
I setting up a proxy server for specific sites using a DNS server, and I am seeking guidance on handling HTTPS traffic. Here's a brief overview of my setup and the challenges I'm facing:
Objective:
...
0
votes
1
answer
24
views
Pacemaker can no longer start Nginx after Debian upgrade
I have a Pacemaker cluster that controls several resources of type ocf:heartbeat:IPaddr2 and one of type ocf:heartbeat:nginx. Since an upgrade to Debian 12 it can no longer start Nginx. What happens ...
0
votes
0
answers
22
views
Inquiry regarding Security considerations for Nginx Docker image
My name is Ramyashree, and I am currently exploring the usage of the Nginx Docker image within our project. I am reaching out to seek more information about the security considerations and best ...
2
votes
1
answer
195
views
Certbot stopped generating certificates
tl;dr : Certbot stopped generating certificates, shows a "Redirect loop detected" error, but there is no actual redirect loop.
The following issue appeared around 2023-11-30. I've focused on ...
0
votes
1
answer
30
views
How to serve static files for Docker Nextcloud-fpm behing nginx reverse proxy?
I have a similar problem to NextCloud FPM Docker Image behind an NGinX Docker Container as Proxy Reverse
I have multiple web apps running in Docker containers behing a Nginx reverse-proxy.
I'm trying ...
0
votes
0
answers
32
views
NGINX Multi Site * SSL Subdomains: Configuration file error : [emerg] duplicate listen options for 0.0.0.0:443
Currently in process of installing SSL on an NGINX, Ubuntu 22.04 Vultr server. I have two existing domains on the server. Setting up a wildcard SSL for an Wordpress Multi Site (Subdomain base) and am ...
-1
votes
2
answers
73
views
Logrotate in Debian 12
I have installed Debian 12 on a server and installed nginx service.
However, Debian 12 don't have installed logrotate package.
I would like know the best practice for this case, if should I install ...
1
vote
1
answer
39
views
What's wrong in this nginx (dockerized) configuration in order to reverse-proxy to my local apps?
My goal is to use an nginx container to reverse-proxy specific paths to my application(s) running in my vps. I've successfully done it by setting up a nginx container manually, but not when using ...
-2
votes
0
answers
54
views
Partial transfer when using Nginx
I have a problem with loading in my website. I have two websites that I host myself through Nginx proxy manager that I also host myself.
One is the test website hosted on Windows 10 in IIS and the ...
-1
votes
1
answer
58
views
How can I authenticate the ownership of the server without opening port 80 in letsencrypt using nginx? [duplicate]
I am on nginx web server.
certbot --nginx -d domain_name
I'd do just this when port 80 used to be open. But a client doesn't know how to open port 80. So, I need alternatives.
0
votes
1
answer
14
views
Can't get sub_filter to work in nginx, could it be an ownership/permissions issue?
I have http_sub_module installed, but the 'sub_filter' line is not working. I'm trying to use it for a dynamic nonce for CSP as per these instructions, replacing some text in script tags with the ...
0
votes
0
answers
28
views
Escaping Japanese Language Redirect (Nginx)
I'd like to redirect a following redirect in Nginx and I think its due to the encoding it has.
I have tried the below code and it doesn't work:
The redirect is:
From Test.com/hub/東京 To Test.com/home,
...
0
votes
1
answer
31
views
Trying to use setfacl to allow script owner to delete cache file
I want to use setfacl to allow a php script owner to delete fastcgi_cache_path files that are owned by nginx. The user has been added to the nginx group.
I have tried: setfacl -d -m u:user:rwx cache, ...
0
votes
0
answers
27
views
passing docker .env variables to nginx site configurations
from docker-compose.yml:
nginx:
volumes:
- ./nginx/sites/:/etc/nginx/sites-available
inside nginx/sites there are a bunch of .conf files for different sites. I'd like to pass variables ...
0
votes
0
answers
20
views
nginx replace given character globally in url
I have a legacy backend wich doesn't interpret url-encoded %2B as a + sign in urls like
http://10.20.30.40/keyvalues?Name=foo%2Bbar%2Bbaz%2B...
http://10.20.30.40/keyvalues?Name=foo%2Bbaz
http://10.20....
-1
votes
0
answers
18
views
Kubernetes + Nginx + Docker Desktop: Annotations not work
My problem is more simple.
I want deploy my app on kubernates/docker.
My problem is:
I build my "Deployment". In this moment only one replica
I build my clusterIP Service to expose my POD ...
1
vote
1
answer
37
views
Nginx auth for all but one subroute in a location
Disclaimer: Im not close with nginx
I had this location block inside my server:
location /appname/ {
proxy_pass http://127.0.0.1:11399/;
proxy_set_header Host $host;
proxy_set_header ...
0
votes
1
answer
99
views
only allow traffic from one FQDN
I have a docker container running a Flask app and then frontending it with an Nginx proxy. The Nginx container is running on port 80 and then I am using an HAProxy for SSL offloading. This setup ...
-1
votes
1
answer
85
views
Nginx Upstream servers and reverse proxy
I'm new to server stuff and started learning nginx, so any help is greatly appreciated.
I have 3 domains from cpanel with the same IP address namely extra1.example.com, backend1.example.com and ...
0
votes
0
answers
55
views
How to block API calls outside its own domain ( NGINX )
I have a website running with NGINX where I have an API and a Vue APP, let's say API it's on api.example.com and the Vue APP it's on www.example.com and I have some requests that I can't use a ...
1
vote
1
answer
148
views
unable to setup HTTP3/QUIC with nginx 1.25.3 on a reverse proxy
Now that nginx supports QUIC and HTTP/3 protocols starting from 1.25.0, i wanted to give it a try. I compiled the same using boringssl as follows:
wget https://nginx.org/download/nginx-1.25.3.tar.gz
...
1
vote
2
answers
96
views
Implement subdomain with port 8080
I have a VPS, on that VPS there is an existing application that is live with Docker port 80. There are two applications that I want to deploy on that VPS, the first application is a Laravel backend ...
-1
votes
1
answer
50
views
nginx, only allow certain IPs to access a URL prefix
In nginx, how can I restrict access to a certain URL prefix by IP address. i.e. “only these IPs are allowed to access $URL?”.
I have a location … { directive, but it looks like the nginx allow & ...
3
votes
0
answers
204
views
Nginx Lua module for redirecting based on proxy and access headers
In nginx I want to redirect user based on access and proxy headers. When I put it to the response header, they are shown correctly in the browser. But when using in lua to redirect with an if it does ...
-1
votes
1
answer
82
views
Letsencrypt is generating self signed certificate, not wanted
I'm struggling with generating certificates for my nginx proxy on Docker.
I've designed the docker-compose in the following way:
version: "3"
services:
postgres-db:
image: postgres:15....
0
votes
0
answers
49
views
Trying to use HTTPS to multiple host ports
I'm trying to configure Nginx to serve my application on both port 443 and 5501 with SSL. I have the following Nginx configuration:
upstream pixel {
server pixel.example.com:8080 weight=1;
...
-1
votes
0
answers
21
views
How do I use the landscape-api command to create a repository which mirrors the official nginx.org stable repository?
I have set up Canonical's Landscape server locally (standalone method) to manage our Ubuntu servers. We use Landscape for managing the servers/VMs, and also to provide a local copy of the Ubuntu ...
0
votes
0
answers
47
views
TLS cipher suites ordering
I have nginx configured to use ssl_ciphers PROFILE=SYSTEM;.
And I have Alma Linux configured to use the DEFAULT crypto policy:
~$ update-crypto-policies --show
DEFAULT
From the RHEL 9 documentation:
...
0
votes
1
answer
43
views
How can I keep track of nginx restarts and reloads?
I have an nginx reverse-proxy on a ubuntu server in AWS. How can I see when it's configurations were reloaded, either via CLI or otherwise, and when it was restarted altogether?
If it doesn't record ...
-1
votes
1
answer
64
views
NGINX stream ssl_preread and vhost
I try to configure a vhost for my vdi (citrix) configuration. The conf makes me crazy! I must use ssl_preread to get working.
Actually, my configuration of NGINX is made over CWP. I have a subdmain ...
1
vote
4
answers
164
views
Ngnix can't write socket file due to SELinux
When setting up nginx with a socket on my newer environment that runs SELinux I am getting the following error:
AVC avc: denied { write } for pid=23704 comm="nginx" name="xxx.sock&...
-2
votes
1
answer
104
views
nginx location proxy pass with file extension
I have the following config:
location /api/ {
proxy_pass http://localhost:3000/;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
...
0
votes
1
answer
86
views
Can I point a subdirectory URL to a different IP/Server? [closed]
I have a React website at "domain.com," which is hosted on an AWS nginx server. The website frontend was developed using React, and the backend was developed using Python and Django. I also ...
0
votes
0
answers
44
views
Ubuntu/Nginx server seems to be supplying non-existant SSL certificate
I had four websites configured on an Ubuntu 22.04 server using NginX.
There was a technical problem with the database connection that required me to move the four websites to a new server.
I moved ...
0
votes
0
answers
58
views
Conditional SSL client certificate request with nginx
Is is possible to make the SSL client certificate request conditional depending on the IP range of the user with nginx?
ssl_verify_client optional always sends the request, but does not fail when no ...
0
votes
0
answers
45
views
(Nginx proxy) Replace host in response in headers and body
It's possible in nginx to replace "Host" header in request.
server_name myexample.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
...
1
vote
3
answers
101
views
Configure nginx running locally to server the port running docker container locally
Hi this may be a noob question.
I am trying to replicate a 502 bad gateway error when using nginx as a web server. I have locally running VM of Ubuntu 20.04.6 LTS on which I have freshly installed ...
0
votes
2
answers
95
views
Improve nginx server block non-www to www
Our current "non-www to www" code at nginx.conf is below. While it seemed to work, now we noticed it's causing errors.
Please don't mark as duplicated. Similar cases are old and seems not to ...
1
vote
1
answer
39
views
nginx Expires header based on mime type for proxied content?
My setup uses a map to define different Expires headers for various static files (based on their mime type). For proxied content (uwsgi_pass), I use a static Expires header:
map $...
0
votes
0
answers
32
views
Nginx Routing to Upstream Based on Cookie or Header Value
This one is bugging me and it should work but I must be missing a nuance somewhere:
#== UPSTREAMS ==
upstream server_vip {
server superduper.com:443;
}
upstream server_alt_vip {
server ...
0
votes
1
answer
33
views
Understanding Kubernetes load balancing with ingress controller using self-hosted load balancer
I'm looking to better understand load balancing concepts in a "self-hosted" Kubernetes environment.
cluster setup architecture image
I have an external load balancer, let's label it LB. This ...
0
votes
1
answer
82
views
nginx rewrite should be a loop
Is chatGPT bullsh!ttn me, or am I missing something obvious?
This is my question:
I have an nginx location block like this:
location / {
location ~ \.html {
# First send it back to ...
0
votes
1
answer
50
views
NGINX reverse proxy not working as expected
I'm trying to deploy an app through docker containers and reverse proxy it to my destination endpoint.
My docker compose file looks like this:
version: '3.4'
services:
monitor.api:
image: ${...
0
votes
0
answers
26
views
Nginx. Replace a part of URI that is proxy passed
I have a CMS instance that has its Admin panel hard-coded at /admin(https://example.com/admin) and it can't be changed by CMS. I thought to try Nginx to carry this task. CMS runs as a Nodejs app and ...
0
votes
0
answers
34
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 ...
0
votes
0
answers
73
views
All routes return 404 with Symfony app and nginx
I think title says it all, this is my nginx config file.
I should mention that locally everything is working fine in dockerized environment so I think it will be nginx related problem. Also the React ...
0
votes
0
answers
35
views
Enabling Level 2 WebDAV on nginx
When I mount my nginx WebDAV server as a macOS volume, it is mounted as read-only.
I've read the suggestions on this page but they use the more_set_input_headers which is not available on my nginx-...