Nginx ("engine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

learn more… | top users | synonyms

0
votes
0answers
6 views

Disk I/O and load average peaks once every hour

We have updated our server from Debian Wheezy to Jessie and from php5.6 to php7.0, but now we have a disk I/O and load average peak exactly every hour. The exact time depends on the system start time. ...
1
vote
1answer
2k views

Unable to install nginx from source in provisioning script

I'm using Vagrant to build a reproducible virtual machine for one of my projects. This virtual machine needs a basic LEMP stack, and I'm using a shell script to provision it after it's created. The ...
2
votes
3answers
2k views

Nginx reverse proxy to another nginx server serving static files

I have an Nginx server hosting a web app which works fine when directly accessed. Its config is below server { listen 8000 default_server; listen [::]:8000 default_server ipv6only=on;...
-2
votes
1answer
21 views

Get real IP address from nginx stream context

My config is stream { upstream web_server { server 54.194.65.153:443; } server { listen 443; proxy_pass web_server; } } So on my site in REMOTE_ADDR I ...
2
votes
1answer
5k views

How to get the equivalent of Apache's Alias “/foo” /path/to/foo working in nginx

I'm trying to configure nginx in front of HHVM to serve up an API which has a landing page listing available versions at / and the actual installed API versions at /api/[version]/. My nginx config so ...
0
votes
0answers
12 views

Containerized Local Web Server Behind EdgeMax Router

I have an Edgemax Lite router with a couple of machines on a single lan. I have one of the machines set up with Ubuntu server 16.04 running LXD. I want to be able to run applications in containers on ...
0
votes
0answers
13 views

nginx + gunicorn caching pages

I have a simple web app running behind nginx using flask+gunicorn and somewhere along the line a stale version of the page is being cached. My nginx config has add_header Cache-Control no-cache; and ...
1
vote
1answer
22 views

NGINX index.php rewrite rules wont work

Recently I changed my webserver from cpanel and CENTOS 7, to use nginx with an scipt called nDeploy, wich works well with wordpress and the sites hosted on my server. I have this script wich is not ...
0
votes
2answers
21 views

NGINX redirecting subdomains to main domain

I have 2 websites running on my server, a Wordpress site and a web-app running on port 8080. I want to point mysite.com and www.mysite.com to the Wordpress site and app.mysite.com to point to the ...
0
votes
0answers
15 views

Nginx: How to forward http://my_ipaddress to http://my_ipaddress:8001/v1/offer/1

I am new to nginx and cannot configure nginx in my RHEL7.2. below is my default.conf in /etc/nginx/conf.d/. I want to forward mydomain/v1/offer/1 to mydomain:8001/v1/offer/1 server { listen ...
1
vote
2answers
2k views

Another PHP NGINX error: “No input file specified”

I looked through about 5 questions and blog posts already and tried everything they told me without luck. I can browse to www.example.com/phpinfo.php, but not www.example.com/index.php. I even went so ...
0
votes
1answer
20 views

My Shortlink Service Count More Hits Then Google Analytics. How Is This Possible?

I have created a simple shortlink service that does a 301 redirection just like Bitly. Rather than storing each visitor hit on a db on a redirection, I am simply analyzing Nginx's access log files to ...
0
votes
1answer
23 views

HTTP/2 enable does not work

On Ubuntu 14.04.4 LTS with HHVM(HipHop VM 3.14.1) and Nginx(nginx/1.10.1) I try to enable HTTP/2 like the following in my vhost server { listen 443 ssl http2 default_server; listen [::]:443 ...
0
votes
1answer
544 views

Postgresql Error: could not receive data from client: Connection reset by peer

I try this stack: nginx + uwsgi + django + postgresql, the request can reach to views of django, client show 500 server internal fault, I check postgres log, found the error could not receive data ...
0
votes
0answers
15 views

how to use nginx to proxy to a host requiring authentication behind an ELB

I've seen this post How to use nginx to proxy to a host requiring authentication?. I can't implement this under an ELB setup (http://www.emind.co/how-to/how-to-force-https-behind-aws-elb/). I want to ...
1
vote
2answers
2k views

403 Forbidden nginx (nginx/1.8.0)

I've just got a new server in DigitalOcean and want to try some other things. I want to start a wordpress site so I follow the first 1-3 steps from here: https://deliciousbrains.com/hosting-wordpress-...
0
votes
2answers
41 views

Programmatically set HTTP response header

I have some web pages that will respond differently based on the request from the client. Anything from a 200 to a 301 to a 404 and so on. I used to do this with Apache and CGI by just sending it in ...
0
votes
1answer
251 views

Wiring uWSGI to work with Django and nginx on Ubuntu 16.04

I am trying to follow this tutorial to setup uWSGI with Django and nginx on Ubuntu16.04. It all works fine up until the very last step (oh the irony...) where I try to execute this command: sudo ...
-1
votes
0answers
20 views

How to resolve “unavailable modifier requested” from uWSGI log?

I believe this is occuring because of incorrect python interpretter for uWSGI. How can this be corrected? I have installed uwsgi-python-plugin and enabled it with plugin=python in my config file for ...
0
votes
0answers
22 views

Nginx: unexpected 404 page in php

This is from my NGINX configuration file location / { index index.html index.htm index.php; try_files $uri $uri/ /profile.php?nno=$uri&$args; } So, when file does not exist on the server, Nginx ...
1
vote
0answers
441 views

Configuring Nginx reverse proxy with SSL and websocket

I'm running a web app that is using websockets and have nginx as a reverse proxy for that and that works fine. I've also been able to get SSL to work without the socket. Now we're nearing the official ...
0
votes
1answer
14 views

Nginx 'listen:port' directive, Cloudflare, and SSL

I have two websites on a server, each with their own vhost file in Nginx. Both are also on Cloudflare, and both have SSL certificates that I've got via Let's Encrypt. Both sites' vhosts files are ...
0
votes
1answer
19 views

How to block access to a folder and all its content if it is accessed outside localhost?

I'm trying to make admin folder accessible just to users reaching site from localhost. The configuration that calls PHP-FPM is below. Let's call it main snippet. location ~ \.php$ { ...
0
votes
1answer
15 views

nginx try_files addheader doesnt work

I have simple location used for server-generated caches: location /api/get-hloc { #add acccess-allow headers add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-...
-1
votes
1answer
18 views

How to setup NGINX to store multiple sites on the same domain? [on hold]

I have domain exampledomain.com with NGINX, it works. I have folder for static HTML/CSS/JS projects (SPA or MPA): /home/user/www. This folder contains 2 subfolders: project1 and project2. I want that ...
0
votes
3answers
1k views

nginx node.js & socket.io 504 timeout

Nginx config server { listen *:80; server_name live.domain.com; server_tokens off; charset utf-8; error_log /var/log/nginx/live-error.log info; ...
1
vote
1answer
2k views

Nginx how to run shell script on page load via lua module os execute and then serve directory listing?

So I have a bash script that I want to execute/run on each "page load" of url so that it will modify (creating symlinks) to a /public/html/ folder that I want the server to then serve. The problem ...
1
vote
1answer
40 views

PHP7 + OpenSSL-1.0.2h on CentOS 7 [Nginx 1.11.1]

Since yesterday, I've applied OpenSSL-1.0.2h to my Nginx server, which I both recompiled from source. For the OpenSSL part, I've followed this guide: https://syslint.com/blog/tutorial/how-to-upgrade-...
2
votes
1answer
1k views

Multiple Domains Name on one server with Nginx

I'm struggling to configure two different domains name on my dedicated server... I've already one DN configured like this in the vhost DOMAIN_1.net.conf : server { listen 127.0.0.1:8080; ...
-1
votes
1answer
32 views

What permissions should I give to CA Bundle file? [duplicate]

Hi I setup an ssl certificate using godaddy and read the following article: Best location for SSL certificate and private keys on Ubuntu. I am trying to protect an aws ubuntu gitlab instance that uses ...
0
votes
2answers
27 views

Handling caching with NGINX when cookies are being set by the server

I've had very good performance results using NGINX microcaching. However, I'm still not sure how to best handle server responses that have the Set-Cookie header. Can responses from the origin ...
1
vote
2answers
6k views

Nginx upgrade to 1.8 - Now getting 502 bad gateway

Today I upgraded my localhost server from nginx 1.6.3 to 1.8.0 and now all my local websites are getting a 502 bad gateway. A standard nginx config file is as follows server { charset utf-8; ...
7
votes
4answers
10k views

getpwnam(“www”) failed in /etc/nginx/nginx.conf

I copied the nginx.conf sample onto my ubuntu 12.04 box (I don't know where to put the other conf files. I'm an nginx noob). When I try to start nginx I get the following error: abe-lens-laptop@abe:/...
0
votes
0answers
8 views

Searching for generic reverse proxy solution with build in letsencrypt support [on hold]

Currently we are using a Sophos UTM as a gateway for our corporate network. Since we have several web sites running on multiple local machines but only one public IP we a using a feature which allows ...
3
votes
2answers
2k views

Restricting nginx website connection to VPN Users on the same server

My main aim is the following: Install a VPN server on a server, and a website on that server should be accessible only to users that are using the VPN on that same server. First, the two server case ...
1
vote
0answers
15 views

NGINX Proxy and Wordpress [on hold]

I have been working on a NGINX proxy for A/B testing. This box has a virtualhost that keeps the corporate site, and aditionally I added another virtualhost that should redirect incoming traffic to a ...
5
votes
2answers
3k views

PHP-FPM does not automatically start after reboot

I'm running PHP-FPM and Nginx, occasionally, for whatever reason, I have to reboot the server. Once the server is running again, the nginx service automatically starts, however, PHP-FPM does not. This ...
0
votes
1answer
1k views

Nginx alias and regex

i'll need a bit of help for alias on folder with nginx I have my folder www/ with the container of my site example.com and a lot of folder like client0, client1, client2... I should NOT modify www/...
0
votes
3answers
2k views

Nginx proxy pass and url rewriting

How to trig this rule only when I have parameters in url, otherwise I will match on an alias. location ~^/static/photos/.* { rewrite ^/static/photos/(.*)$ /DynamicPhotoQualitySwitch/photos/$1 ...
-2
votes
0answers
16 views

Nginix only shows welcome page [on hold]

My vps server was running, but no longer works. My sites are down, I'd appreciate some help getting it fixed. /etc/nginx/nginx.conf user www-data; worker_processes 4; pid /run/nginx.pid; events { ...
6
votes
4answers
3k views

nginx closes connection on some pictures

There is problem with nginx. It closes connection before client finishes download. It looks like: $ wget -O /dev/null http://www.site.com/images/theme/front/clean.jpg --2012-07-11 21:37:03-- http://...
2
votes
1answer
1k views

How to remove “Client-Peer” (etc) header in nginx with php-fastcgi

My setup: OS: Ubuntu 11.04 HTTP Server: nginx 1.2.1 compiled with the HttpHeadersMore module processing PHP via php-fastcgi (other irrelevant software - ruby, python, etc) My problem: I'm ...
0
votes
0answers
17 views

Server migration with the shortest possible downtime [on hold]

If it was the same network and localization I'd simply do: 1. set up new server with nginx, ruby, rails and passenger 2. set up postgres data replication with new server as master 3. a) if load ...
0
votes
1answer
1k views

Multiple sites with Varnish and nginx on the same server

UPDATE: I found a typo in my config. I forgot one of the ports to change over. The issue is resolved. Originally I had a server with nginx running multiple websites. I added Varnish in front to be on ...
0
votes
1answer
36 views

Nginx upstream https not proxing other pages

Having odd situation, even don't know how to search in google, how to describe it...Anyway I'm using Nginx and proxy'ing https traffic to upstream server. Everything is fine with http (with others ...
137
votes
8answers
135k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.example.com It should only be accessible via HTTPS but I'm worried people might somehow stumble upon it via HTTP and get a 404. My html/...
0
votes
1answer
1k views

nginx reverse proxy with basic_auth - 404 Not found

I have an nginx server block to proxy_pass content from three servers: gitlab, Rshiny and static content from another nginx server block. All this works fine, until I try to add password protection to ...
0
votes
0answers
21 views

Nginx to capture url

In Nginx, we can capture client header using $http_name. I was told to use $http_referer to read the url. However, I read that $http_referer is not reliable. Our javascript application's url contains ...