Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
16 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 (...
0
votes
1answer
14 views

Nginx Concurrent limit by per ip

How to limit concurrent http requests with nginx? Like "php -S localhost:8000" I tried but he responding status code to 503 (we need handle when other requests completed): limit_conn_zone $...
0
votes
1answer
26 views

Convert this .htaccess to nginx

I am having some problems trying to translate this to nginx, today I can't make my brain to work well and solve this! RewriteEngine on RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*)$ $1 ...
0
votes
1answer
17 views

How to config Nginx to serve Angular app when the angular urls are like this http://serverpath/a/b?

I'm trying to serve an Angular(V7) app with Nginx. according to https://angular.io/guide/deployment#fallback-configuration-examples I change default Nginx config try_files $uri $uri/ =404; to ...
0
votes
0answers
12 views

GitLab installation has obscured all the other sites on Apache

I have Apache used also as a reverse proxy for a couple of web applications, both in HTTP and HTTPS, but after installing GitLab, it has obscured them all, and if I go to https://myapp.domain.com I'm ...
-1
votes
0answers
12 views

How to install and enable object cache for LEMP on ubuntu 18.04 [on hold]

I deployed my server on digital ocean with LEMP stack. I followed all the official article below to use my server:- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-...
0
votes
0answers
15 views

Reverse proxy for a 3rd party web app

I have a small home server that I use to run various web apps using Docker. I would like to be able to access each of these services on a unique path. This works fine for simple things (like a small ...
1
vote
1answer
24 views

Owncloud behind Nginx (docker containers) not logging remote client IP

For some reason my Owncloud container behind an Nginx reverse proxy is not logging the remote client IP but the Nginx IP. Please check below my config files for Nginx. I've tried multiple solutions ...
0
votes
0answers
32 views

SSL handshake issue for part of users

I have a website that uses Nginx web server, It's work on both HTTP and HTTPS mode, but I'm wondering that HTTPS not working for some users while working for many users at the same time! Also, all ...
0
votes
1answer
11 views

Tomcat behind nginx proxy provides new jsessionids for each request

I have a ReactJS based web app being served by nginx on /. This web app contacts a web service running on Tomcat which is running on port 8443 on the same machine. I have set up a proxy_pass on nginx ...
0
votes
0answers
18 views

nginx and host header with @ in hostname - wrong site served

I've setup a default server for my nginx, that should respond to all IP based requests, as well to all faked and whatever ones. This works, well almost always. Requesting a the site like the ...
1
vote
1answer
17 views

need to craft a regex matching a string in a url while excluding ending string

I'd appreciate some help with crafting the right regex for an nginx map block please. Essentially, I need a match a pattern [typically a word: such as course] in a url but url must not end in ...
0
votes
0answers
23 views

Uwsgi/nginx unix socket refusing connections

I have a python project that I am trying to serve with uWSGI and Nginx. I'm trying to connect the two with a Unix IPC socket (debian stretch), but the socket refuses connections whenever Nginx tries ...
0
votes
0answers
13 views

Chrome err_spdy_protocol_error and Firefox using spdy without according headers

On Chrome, when calling my webpage, I get a err_spdy_protocol_error page. Also, an nginx ssl handshake error is thrown. This got me thinking, why is Chrome using SPDY to call my page and why does it ...
0
votes
0answers
17 views

Proxy requests to nginx from haproxy

I have haproxy in front of nginx, which simply serves static content. Direct access via nginx works perfectly fine - e.g., https://my-nginx-domain.com/some-sub-dir/image.jpg. Here's the nginx ...
0
votes
0answers
13 views

Passing PHP headers to NGinx Proxy

I have nginx setup as a proxy in front of APACHE, which in turn talks to PHP-FPM. It turns out, nginx is cutting out (or better to say not passing through) headers that are set directly in PHP via ...
0
votes
0answers
16 views

Multiple values of limit_req_status for each nginx rate limiting zone

I'm testing nginx rate limiting example. The directive limit_req_status can return a custom error message for requests that exceed the zone's rate limit. I've defined 2 zones (limit1 & limit2). ...
0
votes
0answers
17 views

Encode query string in Nginx

I have Nginx in front of Gunicorn. But I'm getting request where some of the query parameters are un-encoded like this: &userUA=Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_1 like Mac OS X) ...
0
votes
0answers
4 views

How to use Nginx reverse proxy to connect a public server to internal server? [duplicate]

I am currently working on a site that is hosted from a server running in my home. Here is the setup: Server running ESXi, two virtual machines First virtual machine is connected publicly to the ...
0
votes
1answer
33 views

What is the [::1] and 5353 here - resolver 127.0.0.1 [::1]:5353?

This page: http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver gives this example: resolver 127.0.0.1 [::1]:5353; What does the [::1] and :5353 mean?
0
votes
2answers
275 views

Unable to implement Server Push

I am able to implement HTTP/2 on my Nginx server which resides within a Docker container. However, I am not able to carry out server push. These are the configuration files that I have written. /etc/...
0
votes
0answers
17 views

Diagnosing increase in traffic hitting a Django web application

This question is about diagnosing the causes of elevated network traffic in an internet-facing web application. Background: The web application in question is a Django-based forum where users upload ...
1
vote
1answer
14 views

Using Nginx variables in place of CSP values

I have a fairly long Content-Security-Policy header value and I am having to place it in several location blocks. Is it possible to declare a variable in the configuration that has the value of my ...
0
votes
1answer
42 views

Can upgrading the timeout for my proxy pass in Nginx and Gunicorn cause any problems?

I'm going to add these configuration: proxy_connect_timeout 300s; proxy_read_timeout 300s; and for Gunicorn: gunicorn_django -D -b 127.0.0.1:8901 --workers=5 --pid=/var/webapp/campus.pid --settings=...
-1
votes
1answer
20 views

Remote access to Nginx unavailable [on hold]

I have setup my first homelab/media server and am running Nginx as a reverse proxy with ssl listening to port 443. After I finished setting up nginx everything was functional and accessible both ...
0
votes
0answers
7 views

howto: nginx reverse proxy(UBUNTU), SSL Termination with 3 upstream independent servers (not load balancing) [on hold]

I have reviewed variations of this issue but I have not found an exact match that addresses my problem or plan. It could be that this is not an ideal plan (cloud computing) but I would like help or ...
1
vote
0answers
43 views

Win Server 2019 RDS HTML 5 web client not working behind nginx web proxy

Our environment requires that our Windows Server 2019 RDS Gateway (with the HTML 5 web client installed on it) be behind an nginx web proxy. The website portion of things work fine, but the connection ...
-1
votes
0answers
13 views

Nginx reverse proxy $ssl_preread_server_name is empty and $remote_addr is 192.168.1.1

I have a Nginx reverse proxy (version 1.14.2), but i am having some trouble with $ssl_preread_server_name and $remote_addr is not usable. This is the code, that logs and checks the variables. The ...
0
votes
1answer
25 views

How I can use variables in nginx config to provide some paths for NGINX?

I want make dynamic subdomains with logs in separate directories, but have a problem with it: If I provide a path to logs like /var/www/demo/subdomains/$sub/logs/access.log and same with error, NGINX ...
0
votes
0answers
19 views

Unable to connect using http on a docker

I created a new image from linuxserver/docker-nextcloud. The file default contain this : upstream php-handler { server 127.0.0.1:9000; } server { listen 80; listen [::]:80; ...
0
votes
1answer
13 views

Nginx configuration for Geoserver

I'm trying to build a website with access to WMS services from a GeoServer instance on the same DigitalOcean droplet as the website. The droplet is an Ubuntu 18.04 server with - tomcat8 - postgresql-...
0
votes
0answers
16 views

How to host wordpress website on a separate server (Path in subdirectory)

I have an e-commerce website and a blog, both under same domain. Let's assume www.xyz.com (Ecommerce Website - Built in Java - Used tomcat as Servlet Container) www.xyz.com/blog (Wordpress blog) I ...
0
votes
0answers
28 views

Subdomains in LAN with NGINX + Linux [on hold]

I'm trying to set up a NGINX config that runs on my localhost. I want other devices in my LAN to access multiple different servers on my local machine using a local subdomain. myhostname is my ...
0
votes
0answers
23 views

Error 200 during WebSocket handshake: Aws load balancer + ec2 websocket

I'm using load balancer in front of an aws ec2 instance(I will have more in future). In this ec2, I have a website being served by nginx on port 80, a nodejs app listening on 8080 and the websocket on ...
0
votes
0answers
10 views

Editing Nginx FastCGI Buffer Sizes Caused PHP Files to Download Via Browser [closed]

This question is sort of a post-mortem for an issue we had with a dv hosted by Media Temple. We had been experiencing random issues with our webserver (nginx running as reverse proxy on top of apache) ...
0
votes
0answers
19 views

Setting up Nextcloud Locally

I have a current setup where there is an NGiNX reverse proxy that handles all requests and SSL termination but I also have computers on the same local network. I also have OnlyOffice Document Server ...
0
votes
0answers
16 views

Nginx module compatibility, select upstream based on request body

I want to select an upstream server in nginx based on a binary (little endian) number in a POST request. Nginx runs on Ubuntu LTS Server. Can I use the nginx config to achieve this without any extra ...
0
votes
1answer
22 views

nginx password protect - Laravel virtual location

I try to restrict the access to some laravel route path but still without success. Looks like the request is handled by error_page 404 definition because if I comment those line nginx show error 404. ...
0
votes
1answer
50 views

Nginx redirect https://ip to https://domain

I have a script that is out of my control, that creates links that redirect to my server IP but with https:// on it. This obviously create issues with the certificate. I can redirect my ip to http://...
1
vote
2answers
35 views

How to convert this very simple .htaccess to Nginx?

I'm using this .htaccess that pass everything after URL to $param, so example.com/news/id goes to PHP as $_GET['param']='news/id'. But Nginx is always throwing me to 404 page. My .htaccess: ...
1
vote
1answer
29 views

Wordpress file upload succeeds under nginx but attempting to load the file returns 403

I've been trying to debug this for the last few hours and, having solved so many issues already, I seem to have hit a brick wall I have a Wordpress install using nginx under CentOS7 (AWS Lightsail if ...
6
votes
1answer
211 views

nginx conf: http2 module not working in Chrome in ubuntu 18.04

I'm trying to setup the http2 module in nginx on a fresh Ubuntu 18.04 vps. Http2 works fine in Firefox (I checked the response headers). Some third party websites indicate that my http2 configuration ...
0
votes
0answers
19 views

Nginx website not available through domain name, available through curl or IP

When trying to request the server by domain name on Firefox it seems like trying to connect but finally give up. When I connect through IP or using curl everything is ok. Few days ago I was able to ...
-1
votes
0answers
23 views

nginx, always redirect to HTTPS unless certificate file error [closed]

Is it possible in nginx to redirect every http request to https but not in case of certificate error? Edit: examples of errors: certificate file doesn't exists or is corrupted
-2
votes
0answers
22 views

Tor service not working every time I restart, saying active (exited) [closed]

I am trying to run the tor service on a Debian Stretch machine, and it works intermittently. However, after every successful start, upon the time I try to start it again, it doesn't work. When I run "...
1
vote
1answer
25 views

nginx reverse proxy for docker swarm - 502 bad gateway

I am running a docker swarm on "swarm.example.com". On the server, there's a container running that can be accessed on "swarm.example.com:3000". On server "example.com" I'm running an nginx reverse ...
1
vote
0answers
16 views

Nginx redirecting me incorrectly despite my configuration

Ok, so I am working for this new company and was not able to obtain any knowledge from their old developer about the nginx configuration. Everything has been fine until I starting running into this ...
1
vote
1answer
58 views

Fail2ban bans IP, but not until it already has hundreds of requests

I have a jail that picks up on a specific user agent. It eventually bans it, but it still gets by with several hundred requests. Here is the relevant info (unless anything else is needed): Ban ...
0
votes
0answers
20 views

nginx http server location include unknown directive error

my nginx.conf worker_processes 1; events { worker_connections 1024; } http { upstream app_servers { server 127.0.0.1:5000; server 127.0.0.1:5001; } server { ...
0
votes
0answers
18 views

nginx domain to specific port [duplicate]

I'm having an ubuntu server with apache2 and nginx. The apache2 listening to port 80 and nginx on 8000. (php project is runnig on 80 and flask uwsgi app runnig on 8000) I have two domains www.example....