Questions tagged [nginx]
nginx is an open-source Web server and a reverse proxy for HTTP, SMTP, POP3 and IMAP protocols, aimed at high performance and low memory usage.
740 questions
1
vote
1
answer
45
views
Multiple letsencrypt url config nginx
The configuration in question seems to be working, but I'm unclear on best practices.
This server is handling requests for:
example.com
example.org
The certificates from Let's Encrypt via certbot.
...
1
vote
1
answer
83
views
Nginx conf for specific path change root and do no more additional searches
I have an Nginx conf for Typo3 and I want to also use Nginx for other contant than TYPO3. For example, I use phpmyadmin wich is located at /var/www/html/phpmyadmin. The root is set to /var/www/html/...
0
votes
1
answer
30
views
Why is the audio group missing from www-data under nginx/php-fpm?
TL;DR I am trying to make aplay play a wav file. This requires the current user to be in the audio group. It works fine when I invoke it from a logged in user, even when I su -u www-data but the nginx/...
0
votes
2
answers
158
views
Nginx unable to create log directory
On every reboot sudo systemctl status nginx reports:
Jul 07 12:43:46 myhost nginx[409]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such fil&...
0
votes
1
answer
192
views
Allow specific IP addresses through iptables with Wireguard
I have a number of self hosted services on my home server, running Arch Linux.
Context
A number of these are held in Docker containers (each with their own Docker compose file), though one (Jellyfin) ...
0
votes
1
answer
61
views
Cannot access static files for subdomain in nginx
I have a static website and a Django app backend running using gunicorn on port 8000 on a server.
I am collecting CSS files for the static website into /mywebsite-deployment/staticDir/homepage/css/...
0
votes
0
answers
66
views
I can't connect using my public ip in nginx
I have setup port forwarding on my router, Disabled my firewall, tried many different things in nginx.conf and changed stuff like the server_name, but nothing is working. I have also tried to use ...
0
votes
1
answer
252
views
Captive Portal w/ nginx, hostapd, nftables, dnsmasq
I'm trying to make captive portal with nginx, hostapd, nftables, dnsmasq and python-flask.
I have two main problems
I'm not getting a popup on Android, but am on Iphone/OSX.
I'm not sure how to ...
0
votes
0
answers
391
views
Running Jitsi inside Docker on Plesk behind NGINX reverse proxy fails
after 5 hours of spending time to configure Jitsi on my Plesk server inside Docker, I need to give up and ask you — sorry for that.
First, I've followed the tutorial here: https://jitsi.github.io/...
0
votes
0
answers
88
views
nginx webdav missing some files in non-browser clients
I've setup an nginx/webdav instance. I can connect to it just fine. (If it matters, it uses https:// and auth_pam.)
In a web browser (chrome shown), I see everything I expect to see:
(I tested using ...
0
votes
1
answer
268
views
Hundreds of strange connections in iftop
OS is Debian. I'm running nginx as a webserver. I am not running Wordpress. Logging is enabled in the http block with:
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
...
0
votes
0
answers
70
views
Nginx location not working when changing php page
I don't understand why the below Nginx config allows me to get to my index.php ok:
http://localhost:8080/nesting/index.php
but all dependencies of that page, like css, img keep pointing at http://...
1
vote
1
answer
250
views
Getting an nginx server work both on a domain and a subdomain (one of them static and the other served from a Next JS app)
I have an Ubuntu 24.10 Digitalocean VPS and I want to host two websites using Nginx.
One is website-name.com where I want to host a static export of a Next JS website whose contents I have copied to ...
1
vote
1
answer
84
views
WebSocket Error "Unexpected close, re-opening websocket" after moving Focalboard to a subdirectory in Nginx
I'm trying to configure Focalboard to run in a specific subdirectory using Nginx. I followed the steps from the official Focalboard documentation and was able to set it up normally. However, after ...
0
votes
1
answer
147
views
Errors after apt-get upgrade from cron job
I run apt-get -y update && apt-get -y upgrade && apt autoremove from a cron job on Ubuntu 24.04.1 LTS and on Tuesday I got this error:
The following packages will be upgraded:
curl ...
0
votes
1
answer
177
views
NGINX x-forwarded-proto not working
I have an ASP.NET app hosted in a Docker container, with a NGINX reverse proxy, hosted on a VPS. When running in production, the x-forwarded-proto header isn't being passed.
From what I understand, ...
1
vote
2
answers
182
views
What may be preventing access to unpriviledge port on this service unit?
Trying to start nginx via systemd service, I think I gave all permissions it need for unpriviledged ports, even added CAP_NET_BIND_SERVICE, but still get:
nginx[122819]: 2024/09/01 04:11:38 [emerg] ...
0
votes
1
answer
150
views
Redirected too many times after adding ssl certificate to nginx
Before adding ssl_certificate, my nginx.conf is very simple:
server {
listen 80 default_server;
index index.php index.html index.htm;
location ~ [^/]\.php(/|$) {
...
0
votes
1
answer
246
views
About Let’s Encrypt's certification renew and nginx
I'm doing the Let’s Encrypt for the firs time and this 101 question might quite possibly have been answered somewhere, but anyway, from https://eff-certbot.readthedocs.io/en/latest/using.html#setting-...
0
votes
2
answers
59
views
Webserver to forward and decrypts HTTPS to HTTP
Is it possible with Apache or Nginx (or others) to have the webserver configured for HTTPS/443 and translationg every request to simple HTTP and forwarding it to another process (just understanding ...
1
vote
1
answer
266
views
Migrating from Debian 11 to 12, the sudo apt dist-upgrade finishes on a message: 'unknown directive "set_by_lua"' from nginx
I am upgrading a VM at work, from Debian 11 to 12.
I succeed up to the sudo apt-get dist-upgrade, where it fails on:
Setting up nginx (1.22.1-9) ...
Job for nginx.service failed because the control ...
0
votes
1
answer
150
views
Bot crawling getting 301/redirects instead of 404 so it's hiding from fail2ban. How is it getting 301 intead of 404?
I have fail2ban setup and it's working great for most scanning. It triggers off any 4xx in the nginx error log. However, note the following bot scan. Somehow THIS bot is triggering my server to return ...
0
votes
1
answer
264
views
NGINX HTTPS not redirecting properly
I followed Cerbot's instructions
to get a HTTPS certificate for NGINX in my Debian server for a
domain, but the HTTPS is not redirecting properly.
I got the following in etc/nginx/conf.d/app.conf from ...
1
vote
0
answers
1k
views
nginx can't follow symlinks even after "disable_symlinks off;" setting
I have django/gunicorn/nginx based site.
The static files when changed and deployed to the server get uploaded to /home/username/src/static folder.
The website itself is provided from /home/username/...
0
votes
1
answer
926
views
How to logrotate official nginx docker image running by podman
I started official nginx image in podman under root with command:
sudo podman run --name nginx \
... \
-v /var/log/nginx:/var/log/nginx \
docker.io/library/nginx:latest
Logging working ok, but ...
0
votes
1
answer
343
views
nginx serves both port 80 and 443 but always returns HTTP 404 on port 80
I'm running nginx v1.22.1 on my Raspberry Pi 4 (based on Debian Bookworm). nginx returns HTTP 404 Not Found for all requests via HTTP/port 80:
However, everything works nicely via HTTPS/port 443.
...
0
votes
1
answer
203
views
Fine-tune selinux constraints on nginx without semanage?
I'm setting up nginx on a Rocky 8.9 server, and ran into SELinux problems trying to listen on ports other than 80 and 443. The recommended solutions across the internet all seem to recommend semanage,...
5
votes
1
answer
846
views
nginx reload - effectively memory leak
When running nginx -s reload, nginx is meant to soft reload (gradually close existing connections on the Old process, and service new requests on the New process).
It does that, except it seems that (...
0
votes
1
answer
243
views
websocat command argument equivalent for this nginx custom configuration?
I have this nginx custom configuration:
server {
listen 8080;
server_name subdomain.domain.my.id;
location /vless-ws { # Consistent with the path of V2Ray configuration
if ($...
-1
votes
2
answers
165
views
How to get common lines for two variables with multiline text?
I have line-by-line list of domains I got by
for domain in $(nginx -qT | grep -E "^[[:space:]]*server_name" | grep -Ev "^[[:space:]]*#" | sed 's/^[ \t]*//' | sed 's/server_name //g'...
0
votes
2
answers
1k
views
How to suppress nginx worker process notices?
Note: Logging is disabled but the notices still occur!
I want a clean log that only shows errors for my Docker containers but nginx is just flooding the command line with noise even though I disable ...
0
votes
1
answer
351
views
503 Service Temporarily Unavailable while using nginx/traefik with EasyPanel & BTCPayServer?
I'm doing this all on Debian 12 VPS.
I can install easypanel separately & get it working with SSL enabled.
I can install btcpayserver separately using this guide to get BTC/XMR working.
But I ...
0
votes
0
answers
501
views
Cant Access Phpmyadmin on Ubuntu LTS 22.04 (HTTP Error Code 500)
I just installed phpmyadmin on my PC. I followed several instructions such as:
sudo apt update
sudo apt install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/your_domain/phpmyadmin
I use NGINX ...
0
votes
1
answer
380
views
How does nginx work with accessing files on mounted SAMBA/CIFS share?
I have a server running nginx as a web server for video streaming and am considering using an external CIFS/SMB storage share mounted to the server.
As the server would need to download and upload for ...
0
votes
1
answer
42
views
redirect to SSL works but get variables don't work
I have nginx and in server section and port 80 I redirect my host to port 443 such as:
server {
location / {
return 307 https://$host$request_uri/?lang=fa
}
}
It's work and redirect to ...
0
votes
1
answer
319
views
how to start the openresty
When I tried to start the openresty like this in CentOS 7.9, told me the nginx did not start:
[root@k8sslave01 letsencrypt]# systemctl status openresty.service
● openresty.service - The OpenResty ...
0
votes
0
answers
820
views
I am unable to access my HTTP NGINX server over LAN
I have allowed the port in ufw and have the following configuration:
server {
listen 0.0.0.0:8000 default_server;
server_name _;
index index.html;
access_log /var/log/nginx/html....
0
votes
0
answers
436
views
certbot letsencrypt certificate installation failed
I have a small test server at home and I registered with letsencrypt to get a valid certificate.
Certificate expired and wasn't automatically renewed (no harm done, this is strictly for testing ...
0
votes
1
answer
394
views
Big Blue Button installation error: "Challenge failed for domain", thereafter "500 Internal Server Error -- nginx"
Context:
I wanted to install Big Blue Button on a Ubuntu virtual machine via SSH;
I followed correctly the official tutorial up to the "Install" section;
I entered the following command on ...
0
votes
0
answers
44
views
problem making a raspberry transparent
I have a totem with Android operating system connected to a Raspberry (in DHCP) with Nginx, the Raspberry is connected to the network via Wlan interface. The totems are managed by a VM connected ...
1
vote
1
answer
194
views
nginx problems redirecting non-www to my index.html page
I'm ran into an issue with Nginx and I need your help.
I've created 2 A DNS records:
www.domain_name.docker.hub.registry.domain_nameetc.com and domain_name.docker.hub.registry.domain_nameetc.com
I ...
0
votes
0
answers
3k
views
Modify a Set-Cookie header with nginx by adding ";SameSite=None"
I'm having a hard time on this...
My server sets multiple cookies and wants to rewrite one of them by appending ";SameSite=None" to it. Prefer not to append this to all Set-Cookie headers.
I ...
-2
votes
1
answer
85
views
When wildcard is used in logs directory, what does the size tell? The size of 1 log or the total size of all the logs?
https://www.keycdn.com/support/logrotate#maxsize
This limits each log file's size to the specified number of bytes
/var/log/nginx/*.log
{
size 50G
}
Does the 50G size here means the size of all the ...
-2
votes
1
answer
995
views
How to modify nginx configuration with ansible?
I want to add websites with SSL-certificates and URL-redirects to my running nginx-server. I thought of adding a config per website to nginx/conf.d/newsite.conf and then restarting nginx, but I ...
0
votes
0
answers
315
views
NGINX abruptly stopped working after system restart
I'm using Rocky Linux. My NGINX setup randomly stopped working after having previously worked perfectly for months, now all of my reverse proxy sites don't work anymore. I receive an ...
0
votes
1
answer
74
views
Http outperformed Http2 ,why, please help me to figure out?
I'm currently conducting performance testing on my NGINX web server container and I'm encountering some unexpected results. My tests show that HTTP performance is outperforming HTTP/2, despite SSL and ...
0
votes
0
answers
300
views
How to create a catch all https "default_server" for "Welcome to Nginx!" Page, using self signed certificate in /etc/nginx/conf.d/default.conf
I am running a LEMP server with Nginx, and have the "listen 80 default_server;" directive enabled for port 80 in the catch all /etc/nginx/conf.d/default.conf directive. When I browse to the ...
0
votes
1
answer
347
views
Linux host Why can't I ssh into host after adding myself to www-data group?
I've setup a website on a EC2 Linux host (hosted by NGINX). The directory /var/www/html has owner:group as www-data:www-data, so I figured I'd add myself to the www-data group so I was able to edit ...
0
votes
1
answer
119
views
Nginx. Multiple sites on the same server causes error 500
I have two domains linked to the same server: domain1.com and domain2.com.
When I try to configure two separate websites using these domain names, I encounter an nginx error 500.
I have set up nginx ...
0
votes
0
answers
1k
views
Nginx Permission denied
I am using Nginx to serve static files from server. Static file is located in root folder, /server/cdn. I give all permission to this folder with sudo chmod 777 -R server command. Also I changed the ...