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
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
97
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
24
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
154
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
91
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
122
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
63
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
47
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 ...
0
votes
0
answers
37
views
UFW IP does not block nginx
I have the following problem. I have an Alpine Linux system, not in a container. An Nginx web server and the UFW firewall run on it. If an Error 400 or 404 is triggered, UFW blocks the IP. This works ...
1
vote
1
answer
93
views
Can't reach public IP or domain name of my server from within
Say I have a domain name "my.domain.com" with an A Record that resolves to the public IPv4 address (say 160.200.200.21) of my server (running Ubuntu 20.04)
I've installed BigBlueButton on ...
0
votes
1
answer
84
views
How to allow certain IP's to access a page in Nginx?
We have a website running on Nginx in Ubuntu server. The website has an admin page which we want to allow access to the specified IP addresses. I have used the following in the Nginx config, but it ...
-1
votes
1
answer
107
views
Crafting regex for Fail2ban and NGINX
I'm having some trouble understanding how to craft a regex to capture probe attempts on my nginx webserver.
I would like to craft a filter to catch sites hitting certain files (by name) and/or by php ...
0
votes
1
answer
51
views
VM crash - can it be related to SSL errors?
I am not much into server configuration, and I need some help with a problem I am facing.
I have an Debian 11 machine with nginx 1.18.0.
It frequently crashes around 2:00 - 3:00 am.
By inspecting ...
0
votes
0
answers
84
views
Redirect sub-paths to different destinations in kubernetes nginx ingress
am trying to redirect traffic from an older version of my site to the newer version of the site. Although, I have these 2 specific requirements. I need:
old.mysite.com/ to be redirected to new.mysite....
0
votes
1
answer
54
views
Create nginx server in Google Cloud Platform Cloud Shell
I am starting working with Google Cloud Platform and, as my first try, I have installed and configured an nginx server in the Cloud Shell (not Compute Engine Virtual Machine)
When I try a:
curl http:/...
0
votes
0
answers
67
views
How to create an apt-mirror for Ubuntu 20.04 and raspbian using apt-mirror and nginx
I want to create an apt-mirror for Ubuntu 20.04 and Raspbian using apt-mirror and nginx. I also use an external hard drive.
What I realize is that I need two ports for nginx and I ran apt-mirror twice ...
0
votes
1
answer
266
views
Set proxy_http_version at the server level in NGINX config
I use NGINX as a reverse proxy server and have too many location blocks with a proxy_pass directive in my config. I want to use HTTP 1.1 globally. In all examples on the internet proxy_http_version is ...
0
votes
0
answers
24
views
strange nginx error log file: connection to a private ip from a public ip
On a vps I have configured a vpn (wireguard) where the IP is 10.6.6.100.
I found this strange log on nginx error.log:
2023/11/01 03:52:22 [error] 2821800#2821800: *135455 open() "/usr/share/nginx/...
0
votes
1
answer
26
views
Nginx check running process on destination before forwarding traffic
I'm configuring Nginx as UDP load balancer between four servers with the following configurations:
stream {
server {
listen 7004 udp;
#UDP traffic will be forwarded to the "...
-1
votes
1
answer
134
views
Duplicate wordpress feed url
How to create nginx rules to copy the wordpress feed url. Actually, I want two versions of the feeds, one cached and one not, to simulate AWS Cloudfront cache behaviors. Both urls should function ...
0
votes
1
answer
43
views
Defining Burst and No Delay for NGINX
I'm trying to limit my server (an API) to only allow 3 requests to be made per second (by IP, coming from Cloudflare), and after that the user receives an HTTP 429 code.
I don't want to allow anything ...
0
votes
1
answer
31
views
nginx redirect subdirectory
rewrite ^/faq/(.*)$ /faq/$1 redirect;
I would like to redirect domain.tld/faq/* to domain.tld/faq/
Unfortunately, this leads to an endless loop.
Background: There was the FAQ url and very many other ...
0
votes
0
answers
32
views
nginx wss proxy doesn`t work
I`m trying to run wss reverse proxy with nginx, but when i`m trying to connect, i`m getting error without any error codes. When i turned off ssl websocket started working correctly.
My nginx config:
...
0
votes
1
answer
105
views
Nginx proxy on moodle error - too many redirects
I'm learning about proxy cache and load balancing on Nginx lately and been having some problems trying to make a proxy work for a moodle installation that i have, it says "too many redirects"...
0
votes
1
answer
56
views
nginx redirects with changed response code
I am trying to redirect any location that gives 404 to the front page and change the response code to 302.
According to nginx documentation this should be possible?
https://nginx.org/en/docs/http/...
0
votes
1
answer
46
views
Remove trailing slash on nginx except for certaing URLs
I'm removing the trailing slash in a nginx virtual host using the following code but I would like to prevent that from happening when the url has certaing words or slusg like i.e /bar/ or /foo/ etc.
...
0
votes
0
answers
32
views
Prevent hot link nginx specific domain page
I have the following code on nginx to prevent hotlink
location ~ ^/(.*\.(jpe?g|png|gif))$ {
valid_referers none blocked domain1.ext *.domain2.ext *.domain3.ext;
if ($invalid_referer) {
...
-1
votes
1
answer
80
views
open() "/var/lib/nginx/cache/fastcgi/3/d0/bce7bdb8e2c388c7675c97c7324efd03" failed (13: Permission denied)
I am trying to add Caching for Proxy & FastCGI but once i try to view any page on the site it fails with 500 Internal Server Error and when i tried searching my logs for any errors i found that ...
0
votes
1
answer
36
views
php-fpm creats only one socket file
I have multiple virtual hosts with unique domain names, users, and root directories for each on Nginx and php8.1-fpm.
In the /etc/php/8.1/fpm/pool.d/domain.com.conf contains
user = domainuser
group = ...
2
votes
1
answer
226
views
How Check Url Parametr and Redirect with Nginx
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/Cat-8/ID-1/Ads-4-3?page=1 then redirect user to http://website.com/...
0
votes
0
answers
27
views
Nginx very slow when using query string for cache busting
I'm at a bit of a loss here since we've been using this setup for years. For some reason, some - but not all - JS files being loaded using a simple Unix Timestamp query string to bust the cache on our ...
0
votes
0
answers
87
views
why is docker not responding to apache2 port 443 proxpass but fine on port 80?
I have an Azure VM which has an apache2 running with the following configuration,
<VirtualHost *:80>
ServerName .com
ProxyRequests On
ProxyPass / http://127.0.0.1:...
0
votes
1
answer
36
views
Retrieve URL / Request in a fail2ban action with nginx
I have configured fail2ban to block spam attempts with nginx. everything works but I would like to be able to retrieve the url / domain visited in my actions.
recovering the “logpath” also suits me ...
0
votes
0
answers
15
views
libmodsecurity + owasp crs + nginx: regex for hyphen in name of a POST parameter in custom exclude rule
a paranoia_level = 3 of modsecurity forbids non-printable characters to be uploaded with POST payloads (application/x-www-form-urlencoded) in phase 2 using rule 920272 of owasp crs version 3.3.4
But, ...
1
vote
1
answer
94
views
how redirect to specific after word with nginx rewrite
I'm sure this has been asked before, but I can't find a solution that works.
A website has switched CMS services, and i want after ?page= page redirect to main content ! on nginx and with rewrite
I ...
0
votes
0
answers
36
views
How do i run assets (npm run production) on an elastic beanstalk laravel application?
I have a laravel application, running on an AWS eb instance (elastic beanstalk).I have uploded the code, and connected a database and everything works fine without any errors. But i need to compile ...
0
votes
0
answers
44
views
Nginx, getting upstream timed out error
On my machine, there are multiple virtual hosts deployed.
I have a proxy server for these hosts, which redirects requests to the server.
However, I keep getting an upstream timed out error when I try ...
0
votes
0
answers
29
views
nginx routes to wrong domain (most of the time)
I have an nginx set up with four domains, including phpMyAdmin; and everything has been working finde until lately. Actually, I found out today, while I was running the updates on the machine (Ubuntu ...
0
votes
0
answers
263
views
nginx proxy manager: not resolving https but http works
I have a little home network with pihole on 192.168.0.3 and a small home server on 192.168.0.41. On the home server, I run a few services, such as dashy, gogs (in docker containers), and I also have a ...
0
votes
0
answers
24
views
Nginx as reverse proxy for Gitblit with client certificate authentication. Peer closed connection in SSL handshake while SSL handshaking to upstream
We used the nginx as reverse proxy for the gitblit with client certificate authentication.
Given the nginx configuration as below.
server {
listen 443 ssl http2 default_server;
server_name _;
...
0
votes
0
answers
40
views
Cerbot for both NGINX and Redis
I'm running ubuntu with both NGINX (443) and Redis (6379) ports exposed separately on the same machine,
I want them both to use TLS and for that I'm using Cerbot.
From time to time Cerbot ...
1
vote
1
answer
30
views
Redirect removing sufixes after 3 URL segmentes in Nginx
This is the URL that I need to remove the last segment (?order=asc)
https://www.example.com/segment_1/segment_2/page/the_number_goes_here/?order?asc
This is the code I'm trying:
location ~ ^/([^/]+)/(...
0
votes
2
answers
111
views
Why cannot Nginx access files in the `wp-includes` directory?
I have a WordPress website that I installed on an Ubuntu server. I setup Nginx to listen for requests and to push them to php-fpm. I am using the pool feature so that the WordPress site can have all ...
1
vote
1
answer
62
views
How to track down company wide connection issues to a specific web location?
I've tried asking on StackOverflow without success so I hope I this community can help me track down this issue. We have a web app that many people in the company need to access. Occasionally the web ...
0
votes
0
answers
47
views
Using nginx cannot complete acme-challange / access files in new locations
I would like my flask app to be an api eventually, and run it off a windows server. I own a domain on google domains, I added a DNS of api.(mydomain) using the IP address of the computer that it will ...
0
votes
0
answers
141
views
NGINX config for multiple Symfony installations using subfolders
I have a shopware installation (version 6.5.5.1) running on my domain. I want to add more independent Shopware installations, using the same domain (for different languages/countries).
For example, ...
0
votes
2
answers
81
views
NGINX query string doesn't pass to $_GET
I am moving my webapp from Apache to NGINX under AZURE.
The folder structure is
- public/
- index.php
- group.php
- inc/
- group/
- router.php
- body.php
- body_inc.php
When I get ...
0
votes
0
answers
46
views
Is ngx_http_upstream_module comes built-in with Nginx?
I compile nginx without specifying --with-http_upstream_module and it's not listed in the nginx -V output but I still can use upstream directive in my configs. Is upstream module prebuilt in nginx ...
0
votes
1
answer
46
views
Special redirect NGINX Wordpress removing last segment
I need some guidance on how to redirect this the proper way...
I have a site on nginx and a bunch of malformed URL's (crawled by Search Console) that I need to redirect with 301.
My CMS is Wordpress ...