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
1
answer
5k
views
502 Bad Gateway nginx/1.10.3 error with NodeJS (Debian 9)
For a few days I have a server where I run successfully a few Web applications developed in NodeJS.
Everything worked fine until suddenly the browser started to show the error 502 Bad Gateway nginx/1....
18
votes
4
answers
28k
views
PHP-FPM does not automatically start after reboot
I'm running PHP-FPM and Nginx, occasionally, for whatever reason, I have to reboot the server. Once the server is running again, the nginx service automatically starts, however, PHP-FPM does not. This ...
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/...
-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
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. ...
21
votes
3
answers
47k
views
How to follow HTTP redirects inside nginx?
I have an nginx-based HTTP proxy and I would like to process all HTTP redirects inside it so that clients get only the last response in the redirect chain.
The basic code looks like:
location /proxy ...
-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 ...
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 ...
1
vote
1
answer
4k
views
Reverse proxy for RDP according to domain request
I have a scenario hope that someone will help me with that
So the scenario is i have a server that is reachable to the internet and some server that are connected to my lan (In the private network) so ...
5
votes
2
answers
2k
views
Nginx: Rate limit failed basic auth attempts
Given a simple HTTP Basic Auth setup in Nginx (1.14.1 at time of writing) like this:
server {
...
location / {
auth basic "HTTP Auth Required";
auth basic user file "/path/to/htpasswd";
...
0
votes
1
answer
25
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 ...
-1
votes
2
answers
75
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
4k
views
URL masking for nginx server
I have nginx server. I'm trying to redirect .biz domain to .com but URL should be .biz only.
I have tried lots of redirection rule but it is not working.
My .com domain is already live. I want to ...
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
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 ...
1
vote
1
answer
1k
views
NGINX: Failover to backup in ip_hashed upstream
I'm using NGINX as a load balancer to run multiple instances of my site. I'm working on conditional routing to send users to specific servers based on an incoming HTTP header. The end goal is to have ...
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 ...
16
votes
5
answers
108k
views
Nginx defaults to /usr/share/nginx/html
This was a dev site. Pushed to live environment was working as of my backup this morning.
System
Ubuntu 18.04
Nginx
PHP 7.2
MYSQL
Was working on removing TLSv1 form Certificate path. Removed it ...
0
votes
1
answer
5k
views
nginx: [emerg] unknown "name" variable, nginx: [emerg] unknown "ssl_preread_server_name" variable
i'm trying to set up my own Stealth VPN server using NGINX 1.18 in Debian 11. I follow this guide but many of the directives are not working. The problem is when i issue nginx -t test command the ...
1
vote
2
answers
24k
views
NGINX 502 Bad Gateway Connect() failed (133: No route to host) while connecting to up stream
Introduction
Hello, I'm having an issue setting up Nginx for a test website. I have a host and a vm, on the vm a docker application is running on port 3000.
Problem
Now when I do 192.168.1.22:4444 (...
2
votes
3
answers
7k
views
Nginx: Rewrite while preserving the path
I want to set up a temporary redirect to another domain but I want to keep the path very similar.
Here's an example:
Request URL: https://api.mydomain.com/uploads/default/logo.png
Rewritten URL should ...
0
votes
2
answers
4k
views
Using Nginx to serve Multi-tenant app with HTTPS
We have a multi-tenant application (dotnet core + Angular), the main website url for https://example.com, The customers URLs are (http://cust1.example.com, http://cust2.example.com,......)
If the ...
2
votes
3
answers
2k
views
nginx rate limiting: unknown directive limit_req_zone
I'm trying to set up a rate limit for bots using my website, but if I add
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
or anything of the sort to /etc/nginx/nginx.conf in the http ...
0
votes
1
answer
46
views
Proxying a WordPress page from another subdomain
I have an Nginx installed on an Ubuntu server, and I have installed WordPress on blog.example.com.
On the WordPress I created a page for gallery which is accessible from blog.example.com/gallery.
Now ...
0
votes
2
answers
4k
views
How can I further troubleshoot a "502 Bad Gateway" error?
I am running a set of services in a Docker environment. All services are behind the same nginx reverse proxy container that encrypts with letsencrypt and splits the incoming traffic based on ...
0
votes
0
answers
33
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 ...
0
votes
1
answer
5k
views
Wildcard subdirectory in nginx location block
I have the following working vhost configuration:
server {
listen 443 ssl http2;
server_name example.com;
root /home/sites/example.com/html; #main dir for main site domain
index index.php ...
-3
votes
1
answer
763
views
How make SEO friendly url without .php
I want to use SEO friendly url`s like site.com/page
So i looking for a (nginx) rewrite to change /page.php to /page.
My server is running Nginx + PHP-FPM 5.6
I also use images,js,css in the map /...
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 ...
0
votes
1
answer
5k
views
Nginx: special behaviour for upstream "Host not found" errors?
When nginx's proxy_pass returns a 502, there may be a broad range of reasons. What I want is to be able to detect when 502 was returned because upstream host was not found (that is, failed to resolve)....
-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 ...
5
votes
1
answer
4k
views
Unicorn workers timing out intermittently
I'm getting intermittent timeouts from unicorn workers for seemingly no reason, and I'd like some help to debug the actual problem. It's worse because it works about 10 - 20 requests then 1 will ...
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,
...
3
votes
2
answers
4k
views
Unexpected 404 error on all routes laravel application all of a sudden - NGINX|PHP-FPM
I have the following nginx config file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx....
0
votes
2
answers
4k
views
Mikrotik: can't access to port from outside
I exposed web-service on my local machine to the external IP via Mikrotik and can access it via MY_EXTERNAL_IP:5000.
But my nginx-server can't access to MY_EXTERNAL_IP:5000.
Logs:
14:09:53 firewall,...
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, ...
1
vote
1
answer
4k
views
Upload files slow (nginx + http2)
I'm migrating a php webapp from an apache server to an nginx. Everything works as expected except uploading files.
A file of 156 MBs takes ~11s to be uploaded on current server with apache, while the ...
0
votes
1
answer
843
views
Redirect http calls inside iframe to https using nginx
I have an https website that needs to render an iframe of a external website that only works with http. The external http endpoints is all inside a url like: http://external-website.com/foobar
Browser ...
1
vote
1
answer
6k
views
Why is /run/nginx.pid disappearing? simply disappears from the system everyday?
IMPORTANT NOTE: I no longer need to restart the servers(my 3 VPS!) to have the pid file back in the dir /run/nginx.pid
I just typed the command: sudo fuser -k 443 / tcp && service nginx start
...
7
votes
1
answer
4k
views
Python Threads and uWSGI Harakiri
I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
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
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 ...
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 ...
2
votes
1
answer
4k
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 ...
2
votes
1
answer
1k
views
Downloading EXE From Web Throws 403 Forbidden nginx
I have a file uploaded to our website under a /Downloads folder, which I created. The download link, similar to:
A Sample Download Link
had no issues downloading up until a few weeks ago. I am not ...
0
votes
1
answer
5k
views
convert nginx reverse proxy config to apache
I have the following working nginx reverse proxy config
server {
listen 192.168.100.7:443;
server_name mysite.internal;
location / {
proxy_set_header X-Forwarded-For $...
0
votes
2
answers
9k
views
how to configure nginx reverse proxy for tomcat servers?
Well, I have been given the task of "modernizing" an application of the Pleistocene and I can't make this work. Let me explain:
I have a series of tomcat servers, each with the following ...
2
votes
1
answer
5k
views
NGINX unable to get issuer certificate
I am using NGINX web server. Configured my site with a setting where user will be challenged to present his certificate when he makes first request to the site by using following setting:
...