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

2
votes
1answer
1k views

How to setup Proxy Cache with Nginx and Passenger

I use Nginx and Passenger for my rails application. I want to use proxy cache to cache my pages. However, every request go direct to my rails application. I don't know what wrong with my ...
6
votes
5answers
3k views

How can I stop nginx from retrying PUT or POST requests on upstream server timeout?

We are using nginx to load balance requests to our application. We have found that nginx switches to a different upstream server when requests time out (good). However it does this for PUT and POST ...
2
votes
1answer
2k views

nginx regex characters that require quoting?

So I was configuring nginx today and I hit a weird problem. I was trying to match a location like this: location ~ ^/([0-9]+)/(.*) { # do proxy redirects } ...for URLs like ...
1
vote
1answer
18 views

Wildcard Subdomains and Custom Domain Names

I have some questions regarding Nginx configuration with wildcard subdomains, and then how custom domains come into the picture. Here is my situation. Let's say I own the site awesome.com. When a ...
0
votes
0answers
11 views

ROOT version 5.34/14 vs root directive [on hold]

I'm relatively new to VirtualBox, Ubuntu, and mainly to nginx. I was supposed to create a server block, and when I tried to change my document root by using root directive, I got an information that ...
15
votes
1answer
12k views

nested locations nginx

I'm having trouble understanding nested locations in nginx. I have two locations with some configuration directives in common, so rather than repeat the directives, I'd prefer to repeat the URI using ...
0
votes
1answer
23 views

http(s) non-www to www redirect nginx

This is my config: server { listen 80; server_name domain.com www.domain.com; return 301 https://www.domain.com$request_uri; } #server { # listen 443 ssl; ...
0
votes
0answers
13 views

Server CPU at 100 Percent and not responding using PUMA and Nginx

My Server CPU is at 100 percent and not responding using PUMA and Nginx after one or two days. I use 4 workers. Up to now I had a look at the problem with strace, which leads to the following Output ...
0
votes
2answers
1k views

Nginx configuration for caching static files

I have some problem on configuring Nginx to correctly serve an AngularJS application. The server is configured as follow: www.example.com we have the landing page of the application ...
1
vote
2answers
252 views

Cannot figure out NGINX / Puma timeout 110: Connection timed out

Every so often, my rails server stops responding. I tail the logs and there is nothing—just a bunch of requests that have begun to start after the last one completed... Using Ubuntu Puma 2.15.3 ...
0
votes
0answers
6 views

Proxy video from GCS through nginx to prevent CORS problems

I have videos hosted on Google Cloud Storage. Since I have some trouble with CORS on iOS I want to proxy my hosted videos through nginx. The idea is that a client requests https://foo.bar/abc.mp4 and ...
0
votes
1answer
16 views

Pointing 3 domains to same Django app and using different urls to serve each

So I have three domains and three subdirectories in my django app. lets say my IP is x.x.x.x I want the app to work like this: url_visited_by_the_user content_served_from www.domain1.com/ ...
0
votes
1answer
2k views

nginx, gunicorn and django weird 504 gateway timeout

I have an nginx / gunicorn / django setup as follows: Nginx server { listen 80; server_name myserver.com; root /www/python/apps/pyapp/; access_log ...
3
votes
3answers
5k views

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://example.com to the splash folder. But I ...
0
votes
2answers
1k views

Https url appended with port 80 using CloudFlare, Nginx, and Thin

I have a Nginx setup for my Thin server running a Ruby on Rails project. Nginx is currently the endpoint for my SSL. I recently had some issues with attacks on my webserver, so I decided to add ...
0
votes
2answers
2k views

Chef-solo cannot locate an nginx recipe template

I have been recently experimenting with Chef. I thought I would attempt to rebuild my personal web server using chef-solo. It's an AWS instance running the Amazon 64bit Linux AMI. My first ...
0
votes
1answer
1k views

Nginx, second subdomain not working

I used the CNAME wild card DNS entry like: @ IN A ip.add.re.ss www IN CNAME @ * IN CNAME @ My root domain.com and sub1.domain.com are accessible (on the same digitalocean ...
-3
votes
0answers
26 views

How to integrate PHP with NGINX in Debian 8? [on hold]

I have installed nginx and php on debian 8. Now I want to know how to use php with nginx. I want to serve php files from my web server.
0
votes
1answer
2k views

Update Cache-Control max-age when srcache returns response from cache

I have configured Nginx to use srcache (along with the redis and redis2 modules). Server-side caching works great. My application responds with the appropriate Expires and Cache-Control headers, and ...
0
votes
0answers
12 views

How does nginx-plus calculates cache hit ratio

I'm creating a plugin to be compatible with nginx-plus live metrics, and I'm puzzled on how they calculate the cache hit ratio. In using their demo site as well as their demo API, but still don't know ...
0
votes
0answers
14 views

Plesk 12.5 Nginx proxy pass SSL to Node app on different port [on hold]

Preface: tried installing JXCore's Node Extension for Plesk, and I can't get it to work. Gives me some error, and their support is not answering emails...... [IP ADDRESS] = real IP, example.com = ...
0
votes
1answer
1k views

Nginx: nginx alias doesn't work

Here is the full config of my site: server { server_name back.mysite.com; access_log /home/django/mysite/deploy/logs/nginx_acc.log; error_log ...
-1
votes
0answers
19 views

Is it secure to have port 3000 open to public on Node.js app? [on hold]

So I'm running my node.js app on port 3000 on my ubuntu server and used this tutorial How To Set Up a Node.js Application for Production on Ubuntu 14.04 to use NGINX to run it on port 80. However port ...
0
votes
1answer
25 views

NGINX / PHP-FPM + SSL very slow

My application is served on an Amazon EC2 t2.small instance. When using the ab command to test performance. ab -n 3000 -c 100 mydomain.com HTTP Finished 3000 requests Server Software: ...
1
vote
2answers
12k views

nginx config fails with SSL key/pem (unique case)

I am trying to install SSL on my nginx reverse proxy with certified ssl keys but i get this message when i try to restart server: Restarting nginx: [emerg]: ...
0
votes
0answers
18 views

Nginx server block with both IP address and server name for virtual hosts

I am having trouble with configuring virtual hosts with Nginx, and am wondering if that may be because of this remark in Nginx Http Server 2nd Edition, p.68 ...creating server blocks that you ...
0
votes
2answers
31 views

Nginx - rewrite root domain to point to specific Rails controller/action

I have http://foo.com and https://bar.com. When a visitor goes to http://foo.com I would like them to see the content on https://bar.com/pages/about Both domains are hosted on the same server using ...
1
vote
1answer
19 views

Dockerized Apache + SSL behind NGINX as reverse proxy

I have two containers, one of which is running NGINX as a reverse proxy for serveral other containers. One of the other containers is running Apache with SSL enabled and configured. I have seen ...
1
vote
1answer
19 views

django uwsgi and nginx = 400 bad request

I moved my Django website and pip3 install Django. I use the same uswgi wrapper than on the install of server #1 and it works. On server #2, I get a 400 Bad request. If I stop the uwsgi server, I get ...
0
votes
0answers
22 views

manage and organize nginx vhosts config files [on hold]

I'm trying to organize my vhosts config files, actually I use the "standard": /etc/nginx/nginx.conf /etc/nginx/site-available/domain1.com.conf /etc/nginx/site-available/domain2.com.conf ...
1
vote
2answers
2k views

Ruby via FastCGI and NGiNX?

I have NGiNX setup, and would like to be able to run sites I create in Ruby. However my server is pretty fail, only like 250mb memory, probably less, so instead of having to run each Ruby site with ...
0
votes
1answer
3k views

Nginx URL virtual host rewrite issues with Magento e-commerce. Help please

I've been running into some serious problems with my URL rewrites and I can't seem to fix it on my own strength and knowledge and troubleshooting on the web! Basically what happens is that when I ...
0
votes
2answers
35 views

Make nginx serve index.html if requested url is not found without using error_page

I have nginx configured to serve a single page React.js app as static content. react-router handles routing in browser. To make it possible for users to enter all urls (not just the domain ...
0
votes
1answer
71 views

I'm trying to catch brute force against /xmlrpc.php with fail2ban

I'm getting a ton of failed a ton of failed access: 185.103.252.174 - - [28/Apr/2016:15:09:16 -0400] "POST /xmlrpc.php HTTP/1.1" 499 0 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)" ...
0
votes
1answer
18 views

Nginx proxy_pass proxies to the same server

I have an Nginx testing environment set up where I have 2 server blocks. The first is using server_name .DomainA.; and the second is using server_name DomainB.com; Along with this, my client machine's ...
0
votes
0answers
12 views

how to log client ssl handshake logs in nginx

I am using nginx for my servers and the nginx is being used as ssl termination point. Now I want to know the SSL handshake details of client. For example the Certificate information, cipher, ...
1
vote
0answers
15 views

Rails + Nginx + SSL - Allow no-SSL on some routes

I have a rails app being served by nginx. I have ssl enabled on all routes with this conf: server { listen [::]:80; listen 80; server_name domain.com; access_log ...
0
votes
1answer
30 views

Excluding one URL from being redirected to HTTPS generates a loop with current NGINX version

I just updated my NGINX server on Ubuntu to the latest official version 1.9.15. Since then a config that I used for quite a while stopped working. In short, I redirect all traffic to https except ...
0
votes
1answer
58 views

How to use nginx with same host but different url for diff sites

I have different webistes serving on ports 8080, 8090 Now The only port i am allowed is 8085 from outside. Is it possible to do that myserver.com:8085/site1 go to 8080 myserver.com:8085/site2 ...
4
votes
1answer
1k views

How to enable certain SSL cipher while having disabled the group?

I would like to enable the SSL cipher EDH-DSS-DES-CBC3-SHA (also known as TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA) in my nginx SSL environment to support IE8 on Windows XP. The base SSL ciphers for nginx ...
0
votes
1answer
1k views

Proxy_pass 127.0.0.1 in nginx does not work

I install nginx as a reverse proxy. If I use: proxy_pass http://127.0.0.1:81 it does not work. But if I use: proxy_pass http://domain.com:81 it works. And I can use browser to access to ...
1
vote
2answers
88 views

JIRA becomes inaccessible after adding “address=127.0.0.1” in Tomcat connector

I have JIRA and Nginx running on the same server with Nginx installed to serve as a reverse proxy. From what I learnt from various sources, in the server.xml file, I must add an address="127.0.0.1" ...
-1
votes
0answers
17 views

How can i change base url in nginx

I have this config server { server_name example.com; listen 80; # or whatever port location /site1 { proxy_pass http://example.com:1234; } location /site2 { proxy_pass ...
0
votes
1answer
43 views

Nginx ignoring the server name

I have two server blocks server { listen 80 default_server; listen 443 default_server ssl; server_name www.example.com example.com; root /var/www/webpage index index.php; client_max_body_size 3800m; ...
2
votes
1answer
2k 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
1answer
23 views

Nginx's location and proxy_pass missing a request when hash is present in url

I have this config server { listen 8080; access_log /var/log/nginx/access.log; root /usr/share/nginx/htdocs; index index.html index.htm; port_in_redirect off; location ...
1
vote
1answer
31 views

How to forward all http requests to https without breaking letsencrypt with nginx

I'm using Nginx to serve as a reverse proxy for Rstudio server and Shiny server for the purposes of securing the connection to these services. I'm using Letencrypt for free signed certs. I have this ...
1
vote
1answer
36 views

Load balancer displays Error 404 page

I got the following configuration: upstream backend { server xx.azurewebsites.net; server xxx.azurewebsites.net; } server { listen 80 default_server; listen [::]:80 default_server; root ...
1
vote
1answer
24 views

502 bad gateway errors after 68 concurrent users to website

I'm running into issues while doing some stress testing in jMeter. Essentially, we're hitting a hard limit of 68 concurrent users. As soon as the test ramps up to that number of users, we're getting ...
1
vote
0answers
15 views

Loading Flash Content while opening an Image link

The following image is hosted at puu.sh (http://puu.sh/k0Hki.jpg), apparently it loads a swf with a .jpg extension in the url. The following is what chrome/firefox shows as the source (while using ...