nginx (pronounced "engine-x") is a lightweight, high-performance Web server and reverse proxy as well as IMAP/POP3 proxy server.

learn more… | top users | synonyms

1
vote
3answers
959 views

Nginx custom 404 page results in 500 internal server error

Here is my nginx config: server { # Running port listen 80; error_page 404 /404; # Settings to by-pass for static files location ^~ / { # Example: # root ...
1
vote
0answers
16 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
1
vote
0answers
13 views

Nginx not looking for ssl cert in location specified in nginx.conf

nginx conf looks like this: server { ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/4096_SSL.key; systemctl status nginx.service shows ...
2
votes
1answer
996 views

Static file permissions with Nginx, Gunicorn and Django

I attempting to setup a Nginx server up with a Gunicorn WSGI server running Django behind.. The setup all seems to runs except i have a permissions issue. I have setup aliases to /media and a /static ...
0
votes
0answers
7 views

nginx - connect() failed upstream under load testing

I've been doing some load testing with wrk of my nginx reverse proxy -> my web app setup and I noticed that when I get to 1000+ concurrent connections, nginx starts returning 502s and the following ...
-1
votes
2answers
21 views

How can get these NginX try_files to work

I do have a website, which is not Wordpress, and I'm trying a solution for a simple rule. On NginX how can I write a try_files to this case: The link is: http://mywebsite.com/index.php?open=fiction ...
9
votes
4answers
9k views

Permission denied while reading upstream

We have deployed our rails application on on nginx and passenger.Intermittently pages of application get loaded partially.There is no error in application log.But nginx error log shows the following : ...
0
votes
1answer
7 views

nginx or haproxy or varnish Multiple IP addresses, reverse proxy AND manual failover

Ok, so here is all that I'm trying to accomplish. Back Ground I have multiple IIS web servers, each running multiple web sites each with their own IP address. Each IIS "Web Site" through programming ...
0
votes
0answers
4 views

Disable Gateway Timeout for Specific Nginx Port / Folder

How can I disable the nginx timeout when accessing through a specific port, or simply a specified folder. Whichever is easier. Basically I have some scripts which need to execute for a long period ...
0
votes
0answers
14 views

Deploying a (Ruby) web server in a Docker on Elastic Beanstalk: is this double web server ok?

We have a web app in Ruby which is deployable via a Docker setup, among other things to have exactly to same Ruby environment from developers to the production server. We chose to deploy it on AWS ...
1
vote
3answers
2k views

nginx: How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://mysite.com to the splash folder. But I don't ...
-1
votes
1answer
12 views

Pass ASP as PHP on nginx

I have been trying to parse .ASP files as PHP, but no matter what I try (for hours), it just doesn't work. None of the tutorials/notes I find seem to work for me! Either file(s) get downloaded with ...
2
votes
2answers
1k views

What is the difference between using upstream and location for php-fpm?

I've been searching around but couldn't find a straight answer, if someone could please clarify this, would be greatly appreciated, thanks! location ~ \.php$ { try_files $uri = 404; ...
0
votes
3answers
1k 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 ...
1
vote
0answers
15 views

Nginx and gunicorn are not displaying the whole page (caching issue)

I have a django application, which works fine on django's server. I just configured it to work with nginx and gunicorn. Almost every page works just fine except for one of them. It is a pretty big ...
1
vote
0answers
9 views

Accessing Apache page using NGINX after custom authentication

I am using ubuntu 14.04, In which apache is running on port :8080 and Nginx is running on port :80 I am using following code to access apache pages using nginx with my own login page for ...
2
votes
4answers
2k views

Nginx and openSSL conf to use newest TLS protocols

Since few weeks, my webserver, Niginx, had a problem with TLS protocols version 1.1 & 1.2 : When an user try to connect to my website, web browser and Nginx chose only TLS 1.0 for the conection. ...
0
votes
2answers
5k views

nginx rewrite rule to convert URL segments to query string parameters

I'm setting up an nginx server for the first time, and having some trouble getting the rewrite rules right for nginx. The Apache rules we used were: See if it's a real file or directory, if so, ...
4
votes
1answer
2k views

nginx stop/reload on windows failed for Access is denied

I am running nginx on Windows Server 2008 R2 (x64) as a windows service. I am using Windows Service Wrapper for that. (Actually, I have followed this tutorial: ...
10
votes
3answers
4k views

What is the different usages for sites-available vs the conf.d directory for nginx

I have some experience using linux but none using nginx. I have been tasked with researching load-balancing options for an application server. I have used apt-get to install nginx and all seems ...
0
votes
1answer
421 views

Why doesn't nginx serve my 404 page under vagrant?

I have a static HTML site with a 404 page at /404/index.html. Vagrant is mapping port 80 to 9000 so I access my site at http://localhost:9000. The site is browsable, but if I try to force a 404 error ...
0
votes
0answers
19 views

connect() to 127.0.0.1:5601 failed (13: Permission denied) [duplicate]

I have NGINX setup as a proxy for Kibana, a Java server running on 127.0.0.1:5601. If I run curl http://127.0.0.1:5601, I get access to Kibana and everything works great. However, nginx can't seem to ...
3
votes
2answers
945 views

Why is my Rails application hanging?

I have a Rails application of moderate complexity running under Apache/Passenger which becomes unresponsive after periods of idleness. It takes several minutes to respond, but can be temporarily ...
1
vote
1answer
30 views

nginx - why i can't use variables in proxy_pass path?

Why i can't use variable $user in proxy_pass - like in example below? server { listen 80; server_name ~^(?P<user>[a-z|A-Z|0-9|_|-]+)\.example\.net$; root /home/$user/webapps/; ...
-1
votes
1answer
7 views

How to configure xymon hobbit with nginx instead of apache

i installed xymon on debian 7 with an apt-get install xymon now i can't find how to configure nginx.conf to make it work i tried this but not working when i try to access http://debian.local/xymon, ...
0
votes
1answer
24 views

NginX Nested Location Issue: Spitting out raw PHP

I've tried hard to understand NginX's logic in location order processing but it still is beyond me, and I suspect that's why I am getting the following issue. I run a SugarCRM instance, which I have ...
1
vote
1answer
935 views

Ubuntu 12.04 open port 80 inside VLAN

I have an nginx server running on ubuntu 12.04 that serves http through port 80 and https through port 443. Everything works fine if I access it from the same computer via localhost, 127.0.0.1 or the ...
0
votes
1answer
28 views

nginx: Why SSL config on one domain enables the others?

Say I have app1.domain.com and app2.domain.com, and its basic config files app1.conf and app2.conf, inside vhosts.d folder. SSL config files should contain the path of the app, and the path of the ...
1
vote
2answers
2k views

nginx failed (13: Permission denied) uwsgi (502 bad gateway)

I am having trouble running my application on a new DigitalOcean droplet. The machine runs CentOS 6.5 My /etc/nginx/nginx.conf user nginx www-data; worker_processes 1; error_log ...
-1
votes
0answers
16 views

symfony on nginx, first setup, 404 error

I am new to web developement and start to learn about nginx and symfony on how to set up a website. But after my setup, I get the following error when I try to access "localhost" using my web ...
0
votes
0answers
17 views

Setup Chiliproject on Nginx Passenger [on hold]

I have a hard time setting up the Chiliproject on Nginx + Passenger. I got this error whenever I try to access it:- 2015/04/15 12:31:23 [error] 5616#0: *2 directory index of ...
2
votes
1answer
27 views

What I have to modify to have SELinux allow nginx to act as an IMAP/POP3 proxy?

By default nginx under CentOS 7 will fail to start if used as an IMAP/POP proxy. This is because of SELinux. How can SELinux's configuration be altered, without disabling its protections, to allow ...
0
votes
2answers
25 views

How can I get Nginx to listen on all host names instead of specific ones?

This is a part of my /etc/nginx/nginx.conf file. (I've modified it here slightly as to not disclose the actual IP address or DNS entry, but you get the idea.) server { listen 80; server_name ...
2
votes
0answers
10 views

OCSP stapling with nginx

I'm having trouble with OCSP stapling in nginx. So I start up the openssl ocsp daemon, and then I visit my site. Then it says Invalid request. I am using a private PKI and CA. SSL key: 8192bit DH key ...
0
votes
1answer
20 views

Nginx Frontend, Apache Backend, Too Many Time Wait Connections

I am using Apache as a backend with suPHP and mod_sec and nginx as a frontend proxy. This works well so far, but for some reason Apache suddenly spawns so many processes that the CPU load goes up a ...
11
votes
3answers
4k views

Alternatives to apache benchmark? [on hold]

I'd like some tools for ubuntu that I can use to test my server, how much it can handle. Any suggestions? I've used apache benchmark before, but I'd like to try out something else. (As a side ...
0
votes
1answer
2k views

502 Bad Gateway - Nginx, spawn-fcgi, WordPress

I host several sites on a CentOS VPS, and all was working fine until one of the WordPress sites on the server started returning a 502 Bad Gateway error. Other sites work fine. The WordPress site will ...
1
vote
1answer
21 views

Nginx: Selective On/Off of Auth Basic Based on Realm

I run SugarCRM on a LEMP stack and have it closed down with auth_basic. That works fine, headers show: WWW-Authenticate: Basic realm="Username and Password are required" Some files within SugarCRM ...
3
votes
1answer
3k views

nginx : no live upstreams while connecting to upstream

502 bad gateway error displayed when switching between site pages and some times on home page but not for the first request on the home page it is only when another page redirect to it. and it happens ...
0
votes
0answers
36 views

massive amount of CLOSE_WAIT due nginx (lsof)

My VPS keeps hanging up every 5 days. I can see that the nginx worker processes are eating up my memory over time. I think this is due the massive amount of CLOSE_WAIT's open. When I type LSOF, I get ...
1
vote
2answers
28 views

Two domains, same NS and Elastic IP redirect

I have two domains; example.com and example-x.com - the former is the main domain all traffic should go to. Both domains are pointing to the same name servers and each have individual hosted zones in ...
0
votes
2answers
3k views

Use nginx reverse proxy for redirection

I have a.b domain (for example) and want to serve some github pages (username.github.io/project) in a.b/c. It means that I also want to keep my browser url to a.b/c and showing contents of ...
0
votes
0answers
15 views

Reverse proxy is not working

I'm trying to configure nginx as reverse proxy: apache: listen on localhost:8777 nginx: listen on port 80 But I go to http:/blog.example.com/blog, browser it outputs: Error - ...
0
votes
1answer
25 views

nginx config - replace/rewrite all dead links on a page. Add prefix to the uri

I want to inject "project name" to every link on a web page. Example: link and site http://localhost/osqa/ is working, but when I'm on the osqa page, all links are directing to localhost directly ...
0
votes
1answer
34 views

Nginx location match causes 404

I am trying to add behavior for certain file types, but because my content isn't in the same folder, I hit a problem where the location match causes Nginx to look for content in the wrong folder. ...
0
votes
1answer
32 views

nginx one domain few websites

I am having problem with configuration of nginx for few pages on one domain. For example we have example.com. This page allows u to buy some goods, but I would like to seperate pages for continents. ...
0
votes
0answers
22 views

How to configure CentOS VPS Server with WHM/CPanel to run both NodeJS and nginx/apache [on hold]

I've tried (unsuccessfully so far) to setup a CentOS VPS server to run both NodeJS and PHP applications (which means having a NodeJS server + Apache/nginx running together) under two different ...
-1
votes
1answer
22 views

nginx 404 on wp-admin directory

Getting a 404 when access the /wp-admin/ folder. Any idea why? Here's the configuration file - upstream domain_http { server 192.168.1.2:80; } server { listen 192.168.1.3:80; ...
0
votes
1answer
25 views

Unicorn displaying Rack errors uninitialized constant Rack::Lint::REQUEST_METHOD

I've attempted to install Unicorn + Nginx on Ubuntu 14.04. Whenever the site gets accessed (via localhost:8080 or via Nginx) it just returns a blank 500 error. The error log gives me the following: ...
0
votes
0answers
31 views

Nginx: 2 domains on a single server

I have a domain already configured on Nginx (so far so good). Now I added another domain (domain2.com) to Nginx and when I try to access it, it directs to the first domain (domain1.com). domain1.com ...