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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
6 views

Define multiple proxy_pass on nginx proxy

running nginx-proxy as a container for several years now. Perfect smooth, no problems. Docker-compose.yml I am using for that: services: nginx-proxy: image: jwilder/nginx-proxy:alpine ...
0 votes
0 answers
8 views

OWASP ZAP found Nginx server is vulnerable to 'Proxy Disclosure'. Helping fixing this is must appreciated

I performed an OWASP ZAP on my website and it raised a proxy disclosure alert amongst other things. Proxy Disclosure alert https://www.zaproxy.org/docs/alerts/40025/ OWASP description 1 proxy server(s)...
0 votes
0 answers
18 views

Nginx module is getting downgraded from nginx-1.20 to nginx1.14 when I migrate from centos7 to Rocky linux 8

I am doing an leapp upgrade to move from centos7 to rockylinux8 and I see nginx-1.20 and nginx-filesystem-1.20 in centos7 is downgraded to nginx-1.14 in rockylinux8. centos7: nginx-1.20.1-2.el7.x86_64 ...
0 votes
0 answers
18 views

Using socket io with nginx and AWS EC2 instances

I am running into an issue still with my socket io client not connecting to my backend. I have looked through different questions regarding websocket and containerization in the cloud but I have yet ...
0 votes
0 answers
14 views

IP-Filtering on Apache-nginx-Combo

we have the request to secure a domain by restricting access to the ip-ranges of a WAF-Cloud. The server runs Apache for PHP and nginx as reverse-proxy-server, so the chain from browser to website is ...
0 votes
1 answer
34 views

How to remove trailing slash in nginx's passproxy?

I would like to access it as follows using nginx proxy pass. proxy.com/api/ -> proxy.com/api (connected site is example.com) proxy.com/api -> proxy.com/api (connected site is example.com) The ...
  • 1
0 votes
3 answers
39 views

CGI scripts: when can you return a document, instead of an HTTP response?

Script 1 below is bash, and is at https://example.com/cgi-bin/test. It produces the output 'Under construction' when fetched. It echos Status and Content-type headers, and some HTML. If I instead try ...
  • 71
0 votes
0 answers
30 views

nginx serving content from wrong proxy

I have a single server hosting several Rails sites. All sites are identified by unique host names (all domain names map to the same IP address). Both Rails and nginx are running in Docker containers....
  • 213
0 votes
0 answers
16 views

PHP NGINX not working on a Subdomain

I have a Sub Domain" ad.example.com and I am trying to install a CMS and it get stuck at install.php with a 404 not Found error server { access_log /var/log/nginx/ad.example.com.access.log; ...
  • 1
0 votes
0 answers
38 views

fatal: repository not found (git + http + nginx + fastcgi)

I am trying to serve git repositories using Nginx. I have the following configuration for Nginx server: worker_processes auto; error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid; ...
2 votes
0 answers
30 views

Docker NGINX reverse proxy does not work with one docker service, but works with another

I'm trying to run a service Mautic (https://hub.docker.com/r/mautic/mautic) behind NGINX reverse proxy in Docker and can't figure out what I am doing wrong. A little preamble to introduce my setup: ...
0 votes
0 answers
7 views

How to discard a request from burst queue after a certain time in NGINX?

I want to set a low rate limit such as 5r/s to an upstream. I don't want to reject any request for surpassing QPS limit, So I am setting the burst value to a high number and using default delay value ...
0 votes
2 answers
42 views

Read "source IP" from a forwarded connection

My firewall is working ok: the connection from internet is forwarded to a NGINX server, which then distribute accordingly and application server works correctly except for the internal LOGs. The issue ...
  • 1
0 votes
0 answers
21 views

nginx regular expression reverse proxy location

I try to create a location based reverse proxy. My config does not work as expected. It should pass every request that is made to /api & /auth to the backend, and everything else to the frontend ...
  • 127
-1 votes
0 answers
27 views

Redirect part of url Nginx

I need a redirect rule in Nginx for: .../pages/... to .../page/... Everything on the three dots will stay the same, but applies to 1000+ different urls. E.g.: https://example.com/course/1/**pages**/...
  • 1
0 votes
1 answer
25 views

Error 502, phpinfo() directing to 7.4 when 8.1 is installed (File not found)

I'm setting up a web server. I have a freshly installed Ubuntu 22.04, Nginx (welcome page works), and php-fpm which installed php8.1 and php-fpm8.1. To test PHP, I created a /var/www//info.php which ...
0 votes
0 answers
31 views

Letsencrypt - Existing domain certificate gets invalid when adding new domain

When I try to add ssl certificate for a -domain.com on the nginx server, It gets installed and works but the other existing old-domain.com show a certificate error This server could not prove that it ...
0 votes
0 answers
34 views
+50

NginX dynamic rewrite location and alias

For developing purpose, my apps need to be tested on different version, so my idea was to serve it in different url like this : http://example.com/v3/ http://example.com/v4/ ..... http://example.com/...
-1 votes
1 answer
29 views

Nginx: remove port from URL

I got a service running via npm on port 3000. My nginx configuration looks like this: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html/public/; # ...
  • 3
0 votes
0 answers
24 views

Modify the `Host` header or pass `X-Forwarded-Host` instead when using Nginx as reverse proxy?

I'm trying to use Nginx as a reverse proxy and the upstream server is an ASP.NET Core application where I've registered the ForwardedHeadersMiddleware, which will read three different X-Forwarded-* ...
  • 99
-2 votes
0 answers
23 views

How can I map a domain to docker containers?

I have a Redhat Linux server. In that, I installed docker and run docker containers in it. Now I want to map a domain to docker containers by using Nginx. What is the correct process to map domains by ...
0 votes
0 answers
39 views

Nginx - PHP never render. Html files work well

when I enter PHP files, they load forever. But do not show up in the browser. After few minutes the browser goes to timeout. Html files get shown/rendered correctly. Here is my virtualhost: server { ...
  • 339
0 votes
0 answers
20 views

Fail2ban make a custom fail regex filter for Nginx error log

I am new to regex. How do I write a Fail2Ban filter to match with these nxinx error log lines? 2022/11/30 00:46:19 [crit] 57811#57811: *8911 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:...
1 vote
1 answer
30 views

NGINX basic auth bypass IP address OR user agent

How to set up bypass in Basic Authentication by IP address or user agent in NGINX. If I set it like this: map $http_user_agent $auth { default on; "~curl" "off"; } server ...
  • 11
0 votes
0 answers
7 views

browser-nginx compression priority

Nginx with enabled both brotli and gzip compressions replies: curl -s -I -H 'Accept-Encoding: br,gzip,deflate' https://something content-encoding: gzip curl -s -I -H 'Accept-Encoding: br' https://...
0 votes
1 answer
24 views

A proxy forward to redirect some calls to avoid crossing the proxy. Only redirect proxy forward

I'm trying to redirect with 301 some https calls with some proxy forward. The idea is not to go through the proxy, but to return a 301 redirect with the new location. I've got two cases: https://...
0 votes
0 answers
45 views

How to force Nginx Ingress controller to respond HTTP 426 to deprecated routes

I have the following ingress for my namespace on Kubernetes with paths /api/1.0/ redirecting to my old-service and the rest redirecting to the new. Before deprecating & deleting my old-service I ...
0 votes
0 answers
41 views

executed php-fpm files get CPU to 100% usage

Im running a e-commerce/LMS wordpress site with a 2 Core cpu ,4G Ram and 4Gswap ,100G disk space server with CentOS web admin panel. today after getting serveral http 502 report from clients suddeny ...
  • 21
0 votes
0 answers
30 views

nginx rewrite for mobile site, except some extensions

We got an IIS server with two sites: www.example.com and m.example.com (for mobile). The www site has this code in the web.config to redirect to mobile site: <rule name="ignore png" ...
0 votes
0 answers
25 views

Errors while starting Nginx server after the successfull compilation of Lua modules

I have compiled my Nginx package using lua module. Though the compilation was successful but I am getting the below error while starting the nginx server : nginx: [warn] lua_load_resty_core is ...
0 votes
1 answer
21 views

Why does nginx respond to IP address without a default_server directive?

I have an nginx webserver with two sites that listen to port 80 for two domains: dom.net and dom.se In sites-enabled I have files for each of these, dom.net.site and dom.se.site, which are identical ...
  • 115
1 vote
0 answers
16 views

Change "Loaded Configuration File" for a specific domain [Not the entire server]

I do not want to make modifications to the default php.ini the server uses. I've made a new one to use, which is located in my site's own directory on an Nginx server. The issue I have come across is ...
0 votes
1 answer
16 views

How can I port an Apache RewriteCond and RewriteRule to ngnix?

I have to convert an Apache reverse-proxy configuration that uses RewriteCond and RewriteRule, to Nginx. How can I convert something like this to nginx configuration? (this is in the main/only <...
0 votes
0 answers
36 views

Parse HTML as PHP on a Azure App Service (Linux) running PHP 8.1

I am really struggling to get an Azure App Service running Linux and PHP 8 or 8.1 to parse HTML files through PHP. The 8.0 and 8.1 versions run on nginx rather than Apache. I have started by updating ...
1 vote
1 answer
56 views

Nginx not working with domain/url that points to server IP

The configuration I have set (below) works for localhost but not for my domain. The goal is to access port 3000 externally with basic auth so only I can access it. When I go to localhost, it is ...
  • 11
0 votes
0 answers
14 views

open-source ngnix reverse proxy for tomcat servers session persistence with JSESSIONID?

I am tasked with converting (or attempting to convert) some legacy Apache virtual host configuration to Nginx, in Google Cloud (GCP). It is thought that Nginx might solve some performance issues. The ...
0 votes
0 answers
14 views

Nginx behaves differently with the same site configuration in different docker images

nginx site config server { listen 80; server_name _; server_tokens off; gzip_static on; location ~* \.(html)$ { add_header 'X-XSS-Protection' '1'; } location /...
  • 271
0 votes
0 answers
22 views

nginx not serving static files after adding app to docker-compose

I have an app (blog) made with Python and Django. Using docker-compose I've managed to deploy it to a Digital Ocean droplet. The Docker stack includes a Postgres db nginx, nginx-proxy and the nginx-...
0 votes
0 answers
32 views

Azure App Service + Nginx not able to handle more than 5 concurrent requests

I have a PHP 8.1 application deployed on Azure App Service, Nginx and PHP-FPM which is supposed to have long running scripts. The process is working fine for upto 5 requests at a time, but when I am ...
  • 113
0 votes
0 answers
26 views

How to setup nginx to access the internal service with and without VPN by the same link?

I have a service configured for internal users with vpn http site.com:5000 and external users without VPN https site.com. A'm used two nginx on different servers. First nginx located on the same ...
0 votes
0 answers
16 views

Trying to set up a proxy server uisng nginx and docker

I am trying to set up a proxy server to access a network. Currently there is a proxy server that people use securecrt to connect to and their web browser for some resources. I want to set up the ...
  • 11
0 votes
0 answers
21 views

nginx upstream doesn't seem to be recognized

After fresh installation nginx on Amazon Linux 2 (EC2) following commands, $ amazon-linux-extras install nginx1 $ nginx -v nginx version: nginx/1.22.0 $ cat /proc/version Linux version 5.10.144-127....
  • 1
0 votes
1 answer
28 views

www subdomain works but others don't

I encountered a problem with nginx I do not understand. I am able to correctly setup and call www.example.tech and example.tech. However when adding another subdomain like survey.example.tld to the ...
  • 27
0 votes
0 answers
18 views

Issue with 'mkdir(): No space left on device" in Docker Container. Might be some other issue though?

I have some docker containers (NGINX / PHP, MySQL, etc.) that have been running fine for years. However, recently I started seeing this error when running a PHP script in Laravel in the NGINX / PHP ...
  • 139
0 votes
1 answer
26 views

Nginx Error after upgrading php

I have an aws server that runs some php code. I recently upgraded to php8. Now when I access php pages on my site (for example https://whitewaterwriters.com/oracle/index.php) I get a nginx error. I ...
  • 121
0 votes
0 answers
13 views

Block access for ip for custom url (query_string)

nginx 1.19.9 I have url like this https://example.com/test?mindbox-message-key=... https://example.com/men?mindbox-message-key=... https://example.com/women?mindbox-message-key=... https://example....
0 votes
0 answers
18 views

Nginx works with IP address but not URL for home page, gives too many redirections error

I have spent the last 2 days going over a lot of questions like this but I can't seem to understand what I am doing wrong or if for some reason my case is just different. So yes I know this is a ...
1 vote
2 answers
50 views

Nginx won't serve for anything but www.myserver.org

According to the nginx documentation, the server block below should work for both https://joycegroup.org and https://www.joycegroup.org server { listen 443 ssl; ssl_certificate /etc/ssl/certs/...
  • 13
0 votes
0 answers
12 views

nginx config for mirror nor working

i want mirror some websocket requst to port 7000 but this config not wrorking, i dont know what's reasson. worker_processes 1; events { worker_connections 1024; } http { server { ...
1 vote
0 answers
22 views

Setup a streaming server

I would like to setup a streaming server, with RTMP and HLS protocols (and with Nginx). For that, I have a VPS (running Debian). I succeed to make everything works, but I still have an important ...

1
2 3 4 5
332