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,119
questions
0
votes
1
answer
23
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 ...
0
votes
0
answers
23
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 ...
-1
votes
0
answers
33
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
52
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
9
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
22
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
26
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
16
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
16
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 ...
0
votes
1
answer
33
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
82
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
80
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
51
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
109
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
93
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
45
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 & ...
2
votes
0
answers
163
views
+100
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
76
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
18
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
40
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
38
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
56
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 ...
0
votes
4
answers
160
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
98
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;
...
1
vote
1
answer
81
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
40
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
57
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
42
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
96
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
36
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
29
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
29
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
49
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
31
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
66
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
29
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-...
0
votes
1
answer
24
views
Laravel app routes not working when using domain name (fine with IP address) on AWS Lightsail
I am running a Laravel 10.x application on an Amazon Lightsail server here - 18.134.48.92
Currently when browsing to http://18.134.48.92/login I am correctly shown the login page (I am using Laravel ...
0
votes
2
answers
96
views
NGINX Configuration Issue: Specific Subdomain Not Redirecting Correctly
I'm facing an issue with my NGINX configuration, where a specific if condition for redirecting domain traffic doesn't seem to be working as expected. My goal is to redirect traffic from sub1....
0
votes
1
answer
20
views
Need equivalent .htaccess rule in apache just like nginx so I can get everything in URL
I have a VPS where I am using nginx and uses following to do URL rewriting.
location / {
try_files $uri $uri/ /index.php?$args;
}
Then I simply go to index.php and use the following code to get ...
0
votes
1
answer
152
views
HOW Check Url Parametr and Redirect with Nginx rewrite
I want to check if a parameter is present in a url in nginx and then rewrite.
How can i do that?
For e.g if url is http://website.com/search/node/item123/loc=33 then redirect to http://website.com/...
0
votes
0
answers
83
views
nginx latest version with stream
I would like some clarifications regarding nginx installation at Ubuntu (22.04.3). I need to install stream module and expect latest version (current: 1.24, Apr-2023).
My current attempts are shown ...
-1
votes
0
answers
114
views
Nginx malformed HTTP requests
Laravel 8 APP deployed in digital ocean Linux Ubuntu server and hosted using nginx/1.18.0
Sometimes while accessing different pages i get error: 400 Bad Request nginx/1.18.0 (Ubuntu)
As I said "...
0
votes
1
answer
56
views
poor docker / nginx throughput when running with bridge network on ubuntu
My nginx configuration seems to offer extremely poor performance through a docker network, while the host machine (a dedicated server) has great specs (104 threads, 245gb DDR4, SSD).
When benchmarking ...
0
votes
2
answers
45
views
Nginx Failed to load resource: the server responded with a status of 443
This store using WooCommerce has been set up for years. Today I got the complain from customers about this error. I checked it and found out that the css/js/images couldn't be loaded. Does anyone know ...
0
votes
0
answers
22
views
Distinguish if users accessing url from LAN or WAN (nginx) [duplicate]
Is it possible to distinguish between two users (with unknown IPs) that access the same URL, one from the internet (WAN) and one from the local LAN? If not, is it generally not possible or does it ...