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.
5,935
questions with no upvoted or accepted answers
0
votes
0
answers
180
views
Windows NGINX reverse proxy issues proxy from http to https or advice me with config file
I have Windows Server with IP 10.0.0.5
Also added Firewall inbound Rules port 80,443,9444
This IP 100.100.50.50 external provided some company and connected with VPN tunnel
with this Windows Server IP ...
0
votes
0
answers
189
views
Cannot reach domain defined by server_name
I'm trying to map my backend server at http://api:4000 to my-domain.site, where api is the name of my backend service in docker compose.
I run docker compose up and everything works fine, but I can ...
0
votes
1
answer
242
views
Nginx + Flask + React domain path matching
I am using nginx with gunicorn/flask plus a single page react app.
I am using react-router for navigation and in order to make this work I added the following line to my nginx configuration file:
...
0
votes
0
answers
213
views
Images get a 404 error when using Nginx's reverse proxy
I'm using Nginx's reverse proxy to route blog.example.com to example.com/blog/.
Most things work fine, but when I click on an image in example.com/blog, I get a 404 error.
I know that this is caused ...
0
votes
1
answer
85
views
nginx how to execute php scripts on "internal" uris?
I have a problem getting php scripts to execute in internal sites loaded via X-accl-Redirect.. My /etc/nginx/sites-enabled/devdb.easy-ads.com file contains:
server {
root /srv/http/devdb.easy-...
0
votes
0
answers
230
views
Multiple NextCloud instances behind NGINX Reverse Proxy
Currently I have a NGINX proxy running that manages all domains and SSL certificates.
Now I want to access two NextCloud instances on one server (Apache, different paths) via different subdomains.
Eg.
...
0
votes
0
answers
24
views
Pass requests for specified hosts throw VM
I have VPN that restrict all internet except inner resources. I don't like it and i want to install VM, connect it to VPN and redirect all requests for specified hosts to VM and get back answer.
Is ...
0
votes
0
answers
261
views
Reverse Proxy Issue: WordPress Admin Redirects and Incorrect Static Content Serving
I have a configuration issue with my website setup involving a reverse proxy and WordPress. Currently, I have two domains: example.com hosted on server A and example.net hosted on server B. To display ...
0
votes
1
answer
379
views
Nginx emergency: cannot load certificate "/etc/letsencrypt/live/mail.example.com/fullchain.pem". How to fix this Nginx error?
I am running a LEMP email/web server with Ubuntu 20.04. My Nginx user is www-data. I also have roundcube installed in /var/www/roundcube. In my Nginx logs, I am getting the following error:
2023/07/01 ...
0
votes
1
answer
310
views
NGINX Reverse Proxy - Hide origin information to the destination server
I have a script that load images from an external server. This script runs on many different websites and what I need is that every click on the image will be proxied so it seems that the click comes ...
0
votes
0
answers
290
views
flask session work in a development server, but not in a production server(nginx)
I have created a webapp with an authentication system. I use the session module to check if a user is logged in. During the login phase, I set session['logged_id'] = True, and when a client tries to ...
0
votes
0
answers
92
views
Docker swarm bind port to all host interface
Host machine have next network interface:
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:b5:1e:...
0
votes
0
answers
231
views
Nginx reverse proxy returning internal address to client on page refresh
I have a reactjs app being served by a container running NGINX with following configuration:
server {
listen ${NGINX_PORT};
access_log /var/log/nginx/access.log main;
location / {
root /...
0
votes
0
answers
577
views
Running Opensearch behind a proxy
when I configure nginx to redirect /monitor to opensearch, opensearch receives the requests and redirects the user to /app/something which is not under /monitor and thus fails (error 404).
My nginx ...
0
votes
0
answers
152
views
Performance for static files (HTML, CSS and JS) of PHP Server - CDN vs NGINX
Without going too much into detail to avoid that this question becomes opinion-based; so talking from a purely technical perspective: When you currently have a PHP-Apache setup, both PHP and Apache ...
0
votes
0
answers
69
views
Why did apt install dos2unix restart nginx?
# apt install dos2unix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
dos2unix
0 upgraded, 1 newly ...
0
votes
0
answers
163
views
How to rewrite a file URL in a reverse proxy upstream to a host local path?
I setup a Nginx reverse proxy virtual host as below:
location / {
proxy_pass http://127.0.0.1:8082;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Host $server_name;...
0
votes
1
answer
838
views
PHPMyAdmin Fresh Install Error 500 Nginx
I've just done a fresh install of phpmyadmin on nginx and ubuntu 22.04, however navigating to the index page is returning HTTP 500.
My error.log:
2023/06/24 22:52:55 [error] 1448200#1448200: *1 ...
0
votes
0
answers
87
views
Nginx + Wordpress caching - Configuration file sequencing
I'm new to Nginx and Wordpress as a combo. I would love a sanity check on this server side caching code.
Specifically
Is the sequencing correct - esp. the location statements?
Is there anything ...
0
votes
0
answers
493
views
proxy pass/redirect not working on Nginx reverse proxy
I am trying to achieve the below with nginx -
I have 2 docker containers running on a server once container runs nginx on port 80 & takes requests from AWS application load balancer. Then based on ...
0
votes
0
answers
32
views
Learning reason of incorrect redirect in Nginx
There's a web app url of which may vary - it's either .com or my..com depending on if a user is logged or not.
However, there's an element on the main page (that can be accessed via .com or my..com) ...
0
votes
0
answers
242
views
NGINX adds header multiple times falsely
I want to add CORS to my reverse-proxy. Generally everything is working but I don't understand why even though reading the documentation on add_header and reading several forum entries.
In my case I ...
0
votes
0
answers
265
views
How to deploy nextjs app using pm2 on cent OS 7.9 server?
I am facing trouble in Cent OS though.
I install nginx using yum install nginx
Now the folders in nginx were missing, so I created sites-available and sites-enabled.
Then edited /etc/nginx/nginx.conf ...
0
votes
0
answers
44
views
Nginx reverse proxy: no certificate on proxy, use the backend one
I have a small machine that serves as an entry point to my network, let's call it A. I also have two servers on my private network which are not accessible from outside, let's call them B1 and B2.
We ...
0
votes
0
answers
791
views
Nginx Reverse Proxy custom location not serving static files
I'm trying to serve 2 different websites under the same subdomain depending on the location.
Using the GUI from Nginx Proxy Manager Docker container I've managed to set up the initial domain https://...
0
votes
0
answers
76
views
nginx change timeout response
We have a reverse proxy server with nginx.
We want to pass a static page in case the reverse proxy timesout.
Current configuration is:
server {
listen 443;
ssl on;
ssl_certificate ...
0
votes
0
answers
248
views
Error 404 Not Found EC2
I am trying to deploy a flask application that I made with several pages and I'm following this tutorial to do it: https://www.youtube.com/watch?v=ct1GbTvgVNM&t=94s&ab_channel=AMonkinCloud%E2%...
0
votes
0
answers
72
views
Intercept cookie with NGINX from upstream response and create a new cookie
In order to synchronize two web applications, I need to intercept KEYCLOAK_SESSION cookie with NGINX from upstream response - sso.example.com and if such cookie is present, create another cookie SID (...
0
votes
0
answers
496
views
How to solve duplicate MIME error when using reverse proxy in Nginx?
I am trying to route from blog.example.com to example.com/blog using a reverse proxy.
The website is routing fine, but I am having an issue with the images not displaying and I am getting the ...
0
votes
0
answers
301
views
NGINX - How to serve file with filename that begins with the last segment of uri?
I have many PDFs in a \drawings folder on my server. The filename structure is: 8 digits, underscore, Rev level letter -- i.e. \d{8}_[A-Za-z]\.pdf. These files are organized in subfolders that match ...
0
votes
0
answers
32
views
IP Based Rate Limiting for a TCP passthrough vip
Trying to set this up for one of the applications. We use Nginx under the hood. Is it possible to set up an IP-based rate limiting for a TCP passthrough VIP?
I understand that it is possible to set ...
0
votes
0
answers
227
views
Docker and Nginx Reverse Proxy Best Practices
I recently found out some basic security stuff I could implement to ensure that my VPS's are safer. I have tried to implement these but I have run into some problems. I do not know what my next steps ...
0
votes
0
answers
63
views
Nginx not can't recognize files using if statement
I'm trying to perform an operation based on the existence of a file in the file system using Nginx 1.24.0 and Amazon Linux 2.
However, this code is always returning 404.
location ~ ^/test {
if (-e ...
0
votes
1
answer
620
views
Using Nginx reverse proxy with CloudFront
We have a domain served by CloudFront and now we need to add a reverse proxy using Nginx (unfortunately the reverse proxying capabilities of CloudFront are insufficient for our use case).
My question ...
0
votes
0
answers
329
views
Nginx configuration for oauth2-proxy and code-server
I am trying to set up oauth2-server to set up GitHub authentication before reaching my code-server. I am using Nginx and Cert bot to deploy the server.
This is what I have configured in Nginx to ...
0
votes
0
answers
180
views
Getting too many redirects error when attempting to setup reverse proxy for Odoo
I am working on setting up a reverse proxy for my Odoo service but I am getting an error of "too many redirects". I am using Cloudflare and their origin certificates that would be placed on ...
0
votes
0
answers
68
views
SSL_CTX_load_verify_locations("/combinedcerts.cer") failed
I'm getting an error, the "combinedcerts.cer" is present but unable to locate the certificate, this is error i'm getting
nginx: [emerg] SSL_CTX_load_verify_locations("/combinedcerts.cer&...
0
votes
0
answers
210
views
NGINX returns 301 - Not following WebSocket redirect
I have been in the process of commissioning my new server which is an upgrade of an already existing server. In this process, I have moved from Apache2 to NGINX on Ubuntu 20.04 which interfaces with a ...
0
votes
0
answers
134
views
Do I need to use an Nginx reverse proxy between AWS Application Load Balancer and Gunicorn running in Fargate?
I have a Django backend application running with Gunicorn inside a Docker container in Fargate.
Since I'm not serving any static files from the Django server (they are being served via Cloudfront) do ...
0
votes
0
answers
101
views
Nginx 403 forbidden on static files using link_secure with grafana
I am trying to configure auto login using nginx as auth proxy, I am successfully able to authenticate but my problem comes when grafana loads all static files are 401.
my nginx configuration
#i also ...
0
votes
0
answers
92
views
Nginx Redirecting Single Question Mark Request to Originaly URI
I'm trying to redirect URI's ending in a single question mark to the same URI with the single question mark removed. Running nginx/1.21.6
Here's an example.
Original Request:
https://domian.com/...
0
votes
0
answers
44
views
analytics and nginx proxy cache
I want to use nginx caching for my website, and I came up with this configuration:
proxy_cache_key $scheme://$host$uri$is_args$query_string;
proxy_cache_valid 200 5s;
proxy_cache_valid ...
0
votes
0
answers
201
views
Nginx Reverse Proxy using only Trailing Slashes
Hello ServerFault community,
I have been encountering numerous issues with my Nginx reverse proxy implementation, specifically regarding the handling of trailing slashes. I would greatly appreciate ...
0
votes
0
answers
489
views
CORS issue with Nginx proxy server?
I am trying to call a API that is on a docker container on port 80.
I have set up a Nginx proxy server.
if i access via postman it works, so i assume the proxy server is set up correctly.
When I try ...
0
votes
0
answers
150
views
Remote requests to localhost
How is it principlally possible that I have records in my reverse proxy (nginx) log that shows requests form remote ip (second column) to localhost (first column) and it is not proxy requests (not GET ...
0
votes
1
answer
116
views
Nginx sets HTTP_HOST to punycode
I have a unicode domain name. It is configured as punycode in the server_name directive.
When I call $_SERVER['HTTP_HOST'] in my PHP code, I get that same punycode version. How do I configure Nginx to ...
0
votes
1
answer
849
views
NGINX reverse proxy responds to IP but not domain name
I have an nginx reverse proxy setup to point to my nodejs app. When I enter the server IP in the search bar, the website pulls up as expected. When I enter the domain name I get an ...
0
votes
0
answers
49
views
Best practices for running several docker containers on one machine
I have recently built a physical server, this is a first for me as I've previously been using VPS's and other cloud-based solutions. I'm currently planning on hosting a few containers on this server:
...
0
votes
1
answer
74
views
reverse proxy nginx to proxied nginx instance. with SSL and static, how?
I have nginx & webserver that are working together on the same server and it's working flawlessly.
Now I need to move the webserver to another physical server (B or C)
it's was seem easy at first ...
0
votes
0
answers
310
views
Nginx as proxy and very slow client weird issue
We have web api with multiple endpoints behind nginx (1.18.0 on Ubuntu 20) proxy. Everything works fine but one scenario. When user whith our company's Android app tries to upload attchment using ...