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

0
votes
0answers
9 views

dynamic port routing based on request path

The problem: I currently have a nodejs http server which is used to serve long-running jobs. The way the client typically interacts with it is the following: Send a request to '/start/:guid', to ...
0
votes
0answers
5 views

OSX Yosemite can't bind brew nginx to port 80 [migrated]

Installed nginx and php-fpm via Homebrew. I've disabled native Apache 2.4 that comes with OSX by running: glfx:~ glfx$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist ...
0
votes
1answer
7 views

Is it possible to make nginx cache expires at certain time?

So basically what I want to do is make nginx's cache expires at 24:00 everyday. I know I could use tools like nginx-cache-purge or just manually delete cache files on disk, but I prefer to letting ...
0
votes
2answers
30 views

Rewrite in Nginx Does not work for POST request

I have two VPS(one is for fail over), both running Nginx as a Load balancer for backend servers. Also, I have Enabled and configured SSL for my domain(registered on GoDaddy.com) on Nginx. Since I am ...
0
votes
2answers
277 views

Docker and nginx upstream zero downtime

I'm Having some wierd issues trying to automate the deployment of docker containers using nginx's upstream directive. For some reason when I manually do the following it works but when I try to ...
2
votes
0answers
18 views

“echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message

One of my server (Ubuntu 12.04, 16CPU, 32GB RAM) runs the app section of my website (Nginx 1.1.19, PHP5-FPM, Php 5.3.10, Symfony2 Web Framework) Suddenly, users started getting HTTP 5** Errors. When ...
0
votes
0answers
13 views

Nginx, pass environment variables through to FPM automatically?

Is there any way when running nginx from command line to have all environment variables defined at execution automatically propagate to FPM? Ideally without having to hard-code them in any config ...
2
votes
2answers
72 views

nGinx Redirecting to https:// on all URL

I am trying to get the following to work so that no matter what you type in the URL bar you always go to "https://www.". So far www. does not go to https://www. and https:// does not go to ...
-3
votes
1answer
21 views

nginx is displaying index on 404s

Nginx displaying index.php for every non found page. I can access every page that exists such as domain.com/index.php index1.php index2.php But trying to access non existing pages blabla.php or ...
0
votes
0answers
22 views

nginx: Mapping location with try_files

I'd like to map domain.com/mail to serve content in (absolute path in my server) /var/www/default/mail server { ### MAIN ### server_name .domain.tld; index ...
-2
votes
0answers
24 views

Nginx + Pagespeed + varnish 3 or 4? [on hold]

I can't find any information regarding what to use? Is varnish 4 much better than 3? I can see on Google Pagespeed that it supports both 3 and 4. I have a Ubuntu 14.04 LTS, 4 core, 4 GB RAM.
0
votes
1answer
844 views

Nginx reverse proxy with separate aliases

Interesting question I have this python code: import sys, bottle, gevent from bottle import * from gevent import * from gevent.wsgi import WSGIServer @route("/") def index(): yield "/" ...
0
votes
2answers
68 views

Redirect traffic based on url to different ip address maintaining port and url information [duplicate]

We have a QA version, a UAT version, and a DEV version of webapp. Users need to access these via http://uat.company.com:41002/webapp, http://qa.company.com:41002/webapp, and ...
2
votes
0answers
45 views

Intermittent Connection Issues on High Traffic Servers

Some brief background: We've been getting reports of very intermittent connection issues from our users. Several times per day, users will have to reload the page they're on due to a connection ...
0
votes
1answer
3k views

nginx: problem configuring a proxy_pass

I'm converting a web app from apache to nginx. In apache's httpd.conf I have: ProxyPass /proxy/ http:// ProxyPassReverse /proxy/ http:// The idea is the client send this url: ...
0
votes
2answers
1k 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 ...
1
vote
1answer
15 views

Nginx - opens the 1st project when a non existing server name is typed

I have an nginx server running that has multiple projects inside the sites-enabled. The problem comes when trying to access and nonexistent project url, nginx will render the 1st available. Example, ...
2
votes
1answer
78 views

nginx how to block this lightweight DDoS

I have a movies related Wordpress site running with a large database(around 150k posts). For some days during the important traffic hours we get hit by a small scale DDoS which slows down the site ...
-1
votes
0answers
19 views

Control files fetched from upstream when using nginx proxy cache

we have a file sharing site in a local network and we trying to save links bandwidth usage to the max by caching static files in local nodes powered by nginx with caching enabled. Everything works ...
0
votes
1answer
20 views

How would using caching nginx template affect adsense?

I'm considering using the nginx template below for WP sites with adsense on them. Would that cache the adsense ads too and make the clicks invalid? server { listen %ip%:%proxy_port%; server_name ...
0
votes
0answers
21 views

Nginx: Redirect subdomain to path

This is very similar to the question at http://stackoverflow.com/questions/14491944/nginx-convert-subdomain-to-path-component-without-redirect, however I need it to be a permanent redirect (not ...
193
votes
5answers
137k views

In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?

I want to rewrite all http requests on my web server to be https requests, I started with the following: server { listen 80; location / { rewrite ^(.*) https://mysite.com$1 ...
0
votes
1answer
23 views

How to rewrite this url in NGINX

I have multiple urls in this manner. http://domain.com/something/static/variable/ But now I want to redirect the url above to http://domain.com/anything/static/variable/ I tried location ...
0
votes
1answer
33 views

Can't get Nginx to serve correct certificate chain

I'm trying to set up Nginx (1.4.6-1ubuntu3.1) with a StartSSL certificate. I've been following the documentation to get it working, but Nginx only serves the server certificate, not the intermediate. ...
3
votes
1answer
46 views

NGINX Unicorn 504 Gateway Time-out

I try all what I found in the Google by this question, but - nothing. It doesn't work anyway. My NGINX default: upstream app { server unix:/tmp/unicorn.rails.sock fail_timeout=0; } server { ...
1
vote
0answers
34 views

Nginx Server break images on web browser after refreshed 3 to 4 times

Hi I am in very confusing state now. I have configured Nginx 1.6 on Centos 6 for serving only Code (js, css, html) pages all other images coming and calls happened through load balancer. My problem ...
0
votes
0answers
271 views

nginx reverse proxy to apache WebDAV server returns 0-byte files after uploading

Setup: client <-> nginx(:443 SSL) <-> apache(:80 WebDAV) Client uploads file to webdav server. Upload succeeds but file appears to be 0 bytes in size. When SSHing in to apache server the file ...
0
votes
1answer
31 views

nginx proxy pass / rewrite with multiple locations to passenger app and php-fpm

On a server for a small team of people (up to 30) I installed several services which have to be accessible from the browser. I want to use nginx because I consider it being more lightweight. ...
1
vote
0answers
25 views

How to get Nginx to quickly switch to backup upstream server?

I've using Nginx to load-balance a websocket app that runs in multiple Node.js instances. When there are thousands of active connections, a single message broadcast could make Node spin in place for ...
0
votes
1answer
15 views

How to add fastcgi support to nginx?

I'm trying to setup roundcube in my server with nginx on CentOS. this tutorial says: Add the following to the bottom of /etc/nginx/fastcgi_params: # Roundcube config fastcgi_keep_conn on; ...
1
vote
1answer
807 views

How to properly configure Play Framework 2.1+ and Nginx for Production?

I am attempting to properly set up Play Framework with Nginx as the front-end HTTP server on Amazon AMI. I am a bit confused by the official documentation set out by Play. Are they suggesting that ...
0
votes
1answer
17 views

nginx: default_server directive not respected

I have multiple files each with a config for a different vhost. On one of these config files (included in the main nginx config file) I set the default_server directive: server { listen ...
0
votes
1answer
820 views

Uwsgi configuration - No module called site

I am trying to get uwsgi working in combination with nginx for a flask application. This is UWSGI ini file: [uwsgi] socket = 127.0.0.1:8001 processes = 4 module = run:manager virtualenv = ...
0
votes
0answers
18 views

Changing status code from proxied backend server with nginx

I am proxying some paths to another server. That server responds with 302 Moved Temporarily. I need to change that particular status code to 200 OK. Otherwise I can pass response through as-is and ...
1
vote
1answer
57 views

In nginx error log: “SSL_BYTES_TO_CIPHER_LIST:inappropriate fallback”

We recently changed our nginx config to support TLSv1.2 as well as a number of more secure ciphers. Since the change, our nginx error logs have been filled with the following errors: 2015/01/28 ...
1
vote
1answer
1k views

Nginx worker_processes and multi core cpu's - Do Hyper-threading cores count?

Quite often, when reading about the recommended worker_processes for nginx it is stated that this should be set to the numbers of cores the server hosting nginx has. We were wondering if we should ...
0
votes
1answer
860 views

Rewrite all requests to index.php except certain subdirectory requests

I want to rewrite all requests to /index.php, except /css/* and /js/*. This is my original config location / { try_files $uri /index.php$is_args$args; } which works, but lets me access all ...
2
votes
1answer
1k views

nginx return 301 / redirect

among all 'redirect in nginx' questions I couldnt find how to redirect (using return 301 and beteer no ifs) using regexps. I have a link to my website and I'd like to remove parameter a the end: ...
0
votes
1answer
852 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 ...
0
votes
1answer
808 views

how to get rid of xdebug cannot be loaded error

How do I get rid off this error when I run php-fpm In my phpinfo, xdebug is mentioned, so why do I get this error Failed loading xdebug.so: dlopen(xdebug.so, 9): image not found I have php54 ...
1
vote
1answer
33 views

having multiple condition in the config file

I would like to have return 301 https://$host$request_uri; to be executed only for a few cases. I know nginx doesn't support && or || in the conditions and this is a problem for me. I host a ...
2
votes
1answer
14 views

Nginx config to redirect to $URI

I have a problem with nginx. If you call "example.com" or "example.example.com", nginx redirects it to "www.example.com" like I want without a problem. But it doesn't redirect if I enter an URI like ...
0
votes
1answer
46 views

nginx php-fpm not fully working

I'm using nginx-1.6.2_1,2 with php5-5.4.36 on: # uname -a FreeBSD X.X.X 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0 r265974: Wed May 14 07:57:04 PDT 2014 root@X.X.X:/usr/obj/usr/src/sys/R610 amd64 ...
1
vote
0answers
23 views

Drupal application load troubleshooting

I'm receiving some sporadic high server load on a Drupal application (really high. 8 cores, load average of 50). The load is normally sitting between 5-10. The Drupal application sits behind a ...
0
votes
2answers
98 views

increase nginx active connection more than 65535

currently I'm doing setup for nginx to accept C1M, I do in my Virtual BOX with Centos 7.0 and RAM 10G. Here my sysctl.conf configuration. fs.file-max = 9999999 fs.nr_open ...
1
vote
1answer
31 views

Creating subdomain with nginx server block returns Server Not Found

this is a problem I don't get to solve. I have a VPS on DigitalOcean, installed manually a LEMP stack on it and I have the domain with hover.com Everything seems to work if you visit my server ...
2
votes
1answer
980 views

Nginx Reverse Proxy Node.js and Wordpress + Static Files Issue

I have had quite a time trying to get nginx to serve static assets from my wordpress blog. Have a look at the config and let me know if you can help. ( https://gist.github.com/1130332 - to see the ...
1
vote
1answer
66 views

Nginx - what is the meaning to define `burst` if there is the `nodelay` option

In the Nginx configuration, when you want to limit the request processing rate by using the limit_req_zone / limit_req instructions, I don't really understand the use of the nodelay option. In my ...
2
votes
1answer
2k views

UnicodeEncodeError when uploading files in Django admin

Note: I asked this question on StackOverflow, but I realize this might be a more proper place to ask this kind of question. I'm trying to upload a file called 'Testaråäö.txt' via the Django admin ...
0
votes
1answer
676 views

Error code: ERR_SPDY_PROTOCOL_ERROR

Just installed StartSSL certificate on my debian wheezy, nginx 1.6 server. Everything seem to be working fine, I can browse the website in https no problem until I try to login... IE works fine and I ...