Stack Exchange Network

Stack Exchange network consists of 174 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
9 views

NGINX Certbot can´t verify certificate data

Problem: Certbot returns a urn:ietf:params:acme:error:connection-error when trying to install a certificate for subdomain rainloop.example.com. What I´ve tried to solve this issue: I´ve been ...
0
votes
0answers
9 views

.Nginx subfolder to subdomain [duplicate]

Below is the code configuration from NGINX. Well i'm new on this server, so i ask you how can i have subfolders to (virtual host) subdomains. After a lot of search I have found this gists but it does ...
0
votes
1answer
6 views

How to properly redirect all request to non-www inside nginx with reverse proxy

I have a react website served by reverse proxy inside nginx. On top of that, I have SSL. Certbot is handling redirects from http to https. I would also like to setup redirects from www to non-www. I ...
0
votes
1answer
14 views

How to combine squid reverse proxy with nginx proxy for shiny-server

I have a nginx web server which acts as a proxy for my shiny-server. I now want to use a squid reverse proxy to provide access to the nginx server (and thus the shiny server) to internet clients. ...
0
votes
2answers
15 views

Nginx location match multiple extensions unless path starts with specific word

How can I write a location block that matches any path ending in the following extensions: jpg|jpeg|gif|css|png|js|ico|json|xml|txt|html Unless the path starts with "/rails" (eg: /rails/randomstring/...
-1
votes
0answers
16 views

server_name for localhost actually matches <anything>.localhost

I'm testing my config on localhost with nginx/1.15.7 before deploying. Since I only want to handle specific hostnames, I setup a catch-default: server { listen 443 ssl default_server; ... ...
0
votes
0answers
12 views

Server for 1k traffic with Nginx [duplicate]

Im trying to create streaming server (not live stream) with nginx and php I have a data server with a lot of mp4 files. Now i need to get some server to use as "cdn" between website and data server. ...
0
votes
0answers
13 views

Joomla, Nginx, and FastCGI Cache

I'm in the process of moving some Joomla sites that I host onto a LEMP stack from a LAMP stack. I've followed a guide to get FastCGI Cache up and running, and with a single time.php file in the ...
0
votes
1answer
20 views

How to config nginx to include headers into response?

I have nginx which proxies requests to app server browser <=> nginx <=> app_server. For some reason not all headers provided by app_server will be returned to the browser. I.e. headers ...
0
votes
0answers
27 views

How to deal with requests to domains not handled by the nginx config, or requests to the server's own IP

My main objective is to prevent a production certificate being served which would throw a browser warning referencing production.example.com typically in the certificate's SAN field, even though the ...
0
votes
0answers
23 views

Nginx SSL configuration for multiple domains on the same IP

I'm serving multiple domains from the same IP. I enabled SSL for one of them (ssobczak.net) and now I'm getting redirected instead of reaching it. I'm getting redirected to another one: beta....
-1
votes
0answers
17 views

About Gogs container with Nginx reversed proxy and http auth via htpasswd, how to make it desirable? [on hold]

I search this purpose and I am not alone. There are some question are real similar to this. When I try them, unfortunately, it is not clear for me to make it desirable as my purpose. Perhaps, it's on ...
0
votes
0answers
14 views

Failover Nginx reverse proxy

I am looking to setup my Nginx reverse proxy to handle a server failure or Nginx failing for some reason or another. I know how to configure nginx to work as a load balancer/ reverse proxy for other ...
0
votes
0answers
23 views

How to setup Gitlab-omnibus with nginx and https?

I would like to understand, where I made a mistake in this config - gitlab in docker-compose with https and own nginx. first, i create self-singned certs. second, docker-compose.yml nginx: ...
0
votes
1answer
22 views

WordPress with Nginx and Cloudflare

I'm not sure if this is an issue with changing the domain name on a WordPress site, or an issue with configuring SSL certs between Nginx and Cloudflare. I suspect it's a bit of both. I've setup two 2 ...
0
votes
1answer
18 views

Combine 2 Nginx rewrite rules with regex

I have a bunch of URL's I am redirecting in Nginx however some have a "-de" on the end of the location which I would like to remove. I am also removing the "bereich/" part of the URL: https://www./...
0
votes
0answers
12 views

How to softfail when a log server is unavailable?

One of my configuration files includes information about logging: server { error_log syslog:server=elk.example.com:513; access_log syslog:server=elk.example.com:513; } If elk.example.com is ...
-2
votes
1answer
10 views

Unable to install nginx on Amazon Lightsail NodeJs machine [on hold]

I am getting the following error while trying to install nginx. I have hosted a reactjs app on the machine and intend to setup reverse proxy with nginx nginx.service: Failed with result 'exit-code'. ...
3
votes
0answers
40 views

worker_connections are not enough - Nginx, docker

In my production server we have several upstreams which are docker containers running behind a reverse proxy with nginx. One of this containers is a mqtt broker (mosquitto) that we use to connect ...
-1
votes
1answer
15 views

[alert]: fastcgi request record is too big -Fastcgi receives an error message that the get request is too long

Recently, the program encounter ed a problem, LNMP environment, because PHP in the program spliced GET request uri parameter is too long, resulting in an error, nginx processing uri is too long ...
-1
votes
0answers
31 views

“connection reset” occurs in client side and “client prematurely closed connection” showed in Nginx log

I was haunted recently by a problem that some of our customers were complaining that occasionally they could not open the web pages and web browser showed "the connection is reset". This issue did ...
0
votes
0answers
63 views

Easy way to reverse proxy multiple servers having sequential names and IP addresses? [on hold]

I have a bunch of tiny servers that are being overwhelmed by handling the SSL overhead of HTTPS. So I'd like to park them behind an NGINX reverse-proxy that will do some light caching and handle the ...
-2
votes
0answers
17 views

NGINX For 20k Server Blocks

I am having troubles making NGINX load with 10k+ server blocks.... It was taking like 60+ seconds to start before, and now it's not even starting. I am reading into server_names_hash_bucket_size ...
0
votes
1answer
16 views

Nginx proxy_pass to Wordpress site for site.com/blog to blog.site.com

I'm trying to get my Wordpress site to serve from example.com/blog with an Nginx web server proxy_pass to a Wordpress site (apache) hosted on another server at blog.site.com. With my current Nginx ...
-1
votes
1answer
17 views

What does uwsgi_socket_keepalive affect when using the uwsgi protocol?

I was looking at some options to optimize for nginx with a uwsgi upstream and noticed that at the end of the entry for keepalive the docs say: SCGI and uwsgi protocols do not have a notion of ...
0
votes
1answer
25 views

NGINX using other server block as default

I´m currently configuring my nginx server and I´ve ran into a problem where I can´t seem to find the problem I did, even after hours of research. I´m running Debian 9 with PHP 7.2-fpm on NGINX. So, I ...
0
votes
0answers
16 views

HTTP-Basic authentification policy

I am using a nginx-reverse proxy for https to http and http-basic-authentification. The login will be monitored by fail2ban and works fine for me but I would like to have a passwort-policy for ....
0
votes
0answers
17 views

nginx to apache2 reverse proxy not working

I'm running an nginx as a reverse proxy and would like to serve apps running on an apache2 server. The app on the apache2 server is working and available via http://192.168.102:8080/ but I always get ...
0
votes
1answer
17 views

nginx proxy_pass to url based on request

Is it possible to configure nginx (or apache) to use a different backend server based on the request domain? For example: For a request for srv1.pod1.mydomain.com should go to srv1.pod1.external ...
1
vote
1answer
22 views

How to debug big redirect chain in nginx. Unexpected redirect

I have a task to make a large site migration now. And i have a large number of redirects in config. But I cannot understand why one redirect causing second redirect in chain. Even if any other ...
0
votes
0answers
19 views

Nginx status page, writing always : 1

I'm tunning my Nginx server and have implemented microcaching over PHP-FPM which has increased my server's performance. Due to caching: 100 concurrent requests that used to utilize 100% CPU, are now ...
1
vote
1answer
33 views

Nginx listen on any port but rewrite on 8080

I have set up an nginx proxy with Openresty. The proxy takes up an HTTP SOAP POST request, modifies it by using a LUA script written within the root location ("/") of the HTTP server on port 8080, and ...
-1
votes
0answers
12 views

Some solution to restart Apache2/NGINX on 1+ remote servers? [on hold]

Is there a solution remotely force restart Apache2 and NGINX in same time (+/-5 min) on 1+ (in my case 12) servers? Each server have installed only one Apache2 and one NGINX. With solution i mean GUI ...
-1
votes
0answers
19 views

Nginx subfolder to subdomain

Below is the code configuration from NGINX. Well i'm new on this server, so i ask you how can i have subfolders to (virtual host) subdomains. After a lot of search I have found this gists but it does ...
2
votes
1answer
38 views

Improving NGINX Throughput on a Single SSL Thread

We are configuring a file delivery server using nginx. The server will be serving large files over HTTPS. We have run into an issue where we can only achieve around 25MB/s on a single HTTPS thread. ...
-2
votes
0answers
19 views

How to search for a file and jump to some location if it exists without using if directive in nginx

I am trying to find a file and if it exist I want to move to a file found location otherwise move to a file not found location. something like this: location / { if (-f /path/to/...
0
votes
1answer
25 views

Nginx force serve file in if file exist

I want check if file exists in custom location (outside of root) force serve this file ,else rewrite index.php the file locations depends on the subdomain and url path: url : http://my.subdomain....
0
votes
0answers
14 views

activate nginx cache from plesk [on hold]

Details: Plesk version: Plesk Onyx Version 17.8.11 Update #33 Problem: I tried to activate the nginx cache but it does not work. I have tried different configurations, and I have even asked in the ...
0
votes
0answers
18 views

nginx default location does not catch all

Why does my nginx proxy with configuration as below, not direct all locations not specified in the server block to what is given in the default location? server { listen 80; ...
0
votes
0answers
13 views

nginx: Expose number of requests pending for an upstream server

I'd like to monitor an nginx instance, specifically tracking the number of requests an upstream backend is currently processing. This is important to me since the specific backend has a limit on the ...
1
vote
1answer
50 views

NGINX proxy_pass setup fails when adding a location for expiring file types

When adding the following to my Nginx config server block, the /blog/ location starts 404'ing all file types referenced. What is the correct way to leverage the expires directive and continue to keep ...
-1
votes
0answers
27 views

Nginx built with rtmp module worked until ssl was added to server will not restart config tests good

Setup nginx with the rtmp modules in order to do video restreaming and a video player using this guide. Had no issues nginx server worked great. Next step was to put SSL on the web page and that's ...
0
votes
1answer
22 views

nginx server configuration to redirect all requests to ssl without subdomain

I want to redirect all requests to example.org. I created a configuration file as below. I can redirect the requests from : http anything.example.org to https example.org https anything.example.org ...
1
vote
2answers
41 views

Not able to set sub-page on nginx

Sorry, if this is an easy to solve issue, but I'm fairly new with nginx and try to solve that issue for days now. My issue is, that I want to display a self-made index.html under example.com/api, yet ...
1
vote
0answers
20 views

How to define nginx code for per Domain?

My /etc/nginx/nginx.conf code is : server { ..... location / { root /var/www/public_folder; index index.php index.html index.htm; } . . . } and my created Domain config file is: nano /...
0
votes
0answers
37 views

nginx default location redirect

Is there a way of making nginx use the location / {} block, when a user types "hostname/anything-not-already-a-location" into the browser? I want to be able to type "hostname/anything" and be ...
0
votes
0answers
31 views

php-fpm and nginx in single cause php-fpm crash

I want to run services written in php in cluster. So I'm using docker. Here is the stack: php 7.2 php-fpm docker nginx rabbitmq/redis/db/etc In local edvelopment, there is no problem to share ...
0
votes
2answers
38 views

Nginx PM2 NodeJS reverse-proxy with SSL gives HTTP 504

Once upon a good time, I had a good config for three NodeJs, socket.io API running on the same Ubuntu 16.4 LTS VPS server with PM2 for process managing and Nginx for reverse proxy to three different ...
0
votes
1answer
16 views

Permissions for a webhook under NGINX

Here is what I have on an Ubuntu Server 16.04 LTS: I'm hosting a static website (build using https://gohugo.io/) on a private github repo I created a Webhook.php on my Webserver that is called by ...
0
votes
0answers
33 views

Nginx subdomain 404

(I apologize in advance for the amount of config in this post. I've been messing with this for several hours and I'm fairly new to Nginx, so I didn't want to exclude something that was potentially ...