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
0answers
2k views

upstream timed out (110: Connection timed out) while reading response header from upstream

For some reason, I am getting this error whenever I am running a query on my server. On my local setup, this query takes around 7-8 seconds to return, but it keeps timing out on my actual server. ...
2
votes
0answers
417 views

Nginx not honoring must-revalidate

I want to use nginx as a caching reverse proxy. I also have a special requirement, which I thought could be accomplished with nginx. I am using Amazon s3 as origin server and I use signed urls to ...
2
votes
0answers
237 views

nginx and php-fpm performance cpu bound

in peak hours our server is cpu bound. we are hitting 100% cpu. using php5-fpm and nginx on a large ec2 instance. to serve around 50 million requests per day. we are using this server to serve JSON ...
2
votes
0answers
521 views

Subsonic not working behind nginx due to ;jsessionid= being add to every single URL

I started using nginx as a front-end in order to standardize my services access via sub-domains. It works well for pydio and webmail (RainLoop, very good), but Subsonic doesn’t log in. There is no ...
2
votes
0answers
42 views

Strange faulty 16000d response timing in gdevtools for specific XHR

We have some XHR on our website, that is reported in Google developer tools' network timeline as Receiving for 16035.5 days. There actually is a response, and for sure it does not take as long as ...
2
votes
0answers
109 views

Weird nginx configuration: multiple rewrite rules doesnt work

I have an application which knows how to prepare some special images and its running on a separate machine (i'm trying to use it as image server). When these images are prepared and served by ...
2
votes
0answers
473 views

Issues with nginx behind haproxy

I'm hosting an ajax site (AngularJS) and it's assets/partials reside on my static asset servers running nginx behind haproxy. My setup looks as follows: Web -> Haproxy -> App (custom) and ...
2
votes
0answers
269 views

Force chunked transfers when using gzip static on / sendfile in Nginx?

Nginx seems to disable chunking when sending files that are pre-compressed ala gzip_static on Is there any trick to force it to chunk anyway? Chunks seems to give some browsers the illusion of faster ...
2
votes
0answers
142 views

Nginx limit_conn in IF statement?

How to make possible something like this? location /download/ { limit_conn addr 2; if ($arg_C) { limit_conn addr 1; } } Gives me: Restarting nginx: nginx: ...
2
votes
0answers
527 views

How to debug CGI over fcgiwrap/nginx

I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
2
votes
0answers
364 views

nginx/php + zurmo, rewrite or internal redirection cycle

I am trying to get Zurmo CRM running on my Debian Jessie system on localhost. I couldn't find an example nginx config and the application needs to rewrite URLS, which I have done wrong. I also use ...
2
votes
0answers
2k views

Disable IPv6 in nginx proxy_pass

My server doesn't have IPv6 adresses. However, when I use Nginx proxy_pass to upstream with IPv4 and IPv6, sometimes it tries to send outgoing requests using IPv6: 2013/07/30 00:25:06 [error] ...
2
votes
0answers
751 views

Trying to get the “pool seems busy” errors to stop with php-fpm

I have a machine that is running with 3 cores and 7GB of RAM. On this machine we are running Nginx 1.4.2 and PHP-FPM. Each PHP-FPM process uses ~30MB of RAM. So this is the pool configuration I have ...
2
votes
0answers
65 views

cacti send alert once nginx cannot be accessed

I already enabled graph on Nginx client stat and Nginx Socket stat, threshold plugin also installed, and they are working fine. I would like to know how can I get alert once users can't access nginx? ...
2
votes
0answers
525 views

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
2
votes
0answers
81 views

Is it possible to dynamically set the upload_store value for nginx upload modue?

I have a lot of hard drives in my server and I want to upload files to them. Since it is overhead to upload a file to one drive and then move it to another, I would like to directly upload the file to ...
2
votes
0answers
4k views

Nginx/uWSGI - upstream prematurely closed connection while reading response header from upstream

I've got an Ubuntu server configured with Nginx and uWSGI to serve Django which was setup and working with the default start page yesterday. All I have done since is install MySQL and later ...
2
votes
0answers
1k views

Using SAML authentication within nginx

I want to restrict access to some static content, served using nginx, using an existing SAML 2.0 IdP. (In Apache, this would be done with a module such as mod_mellon or mod_auth_saml) What is the ...
2
votes
0answers
475 views

large javascript file not being served properly by nginx

I'm having trouble serving a large (376kb) javascript file via nginx over ssl with gzip enabled. The file is served without issue over plain old http. The file in question is ckeditor.js and is ...
2
votes
0answers
760 views

nginx - Hide .php extension, and permanently redirect *.php requests to the clean url

After a lot of googling, I've managed to get pretty URLs working by using: server { listen 80; server_name www.url.com; rewrite ^/(.*) http://url.com/$1 permanent; } server { ...
2
votes
0answers
153 views

nginx reverse proxy not returning website

The setup Currently, we have an Apache2 webserver acting as load balancer for our web architecture. The backends are Xen virtual machines accessible via IPv6 for the public Internet and via IPv4 for ...
2
votes
0answers
311 views

Nginx multiple server blocks

Im having an issue trying to configure Nginx to work with gitlab and some other sites I have. I have foo.com that points to my server. bar.foo.com also points to my server. I'm trying to have ...
2
votes
0answers
430 views

Understanding Nginx try_files and fastcgi_path

I'm trying to convert a very simple .htaccess file to nginx: Options -Indexes -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] As I read on Google and ...
2
votes
0answers
218 views

nginx does not respect “root” directive

I'm running an EC2 instance with Ubuntu and trying to setup virtual servers for two domains without luck and cannot figure out why. My web documents are located in /var/www/<domain> and ...
2
votes
0answers
2k views

syslog-ng and nginx logs to mysql

So couple of days ago I asked how to log php and nginx logs to centralized MySQL database, and m0ntassar gave a perfect answer :) cheer ! The problem I am facing now is that I can not seem to get it ...
2
votes
0answers
242 views

Nginx / PHP-FPM setting 404 / 5xx on externals

So I've recently been trying to help out the community by building a pimcore based nginx vhost config. Everything works very well from what I can see except for 1 small issue. If any of the pages ...
2
votes
0answers
370 views

Application reports timeouts. However nginx has no record or log

We are serving Django via nginx/uwsgi. We use AWS ELB behind a VPC. This is a webservice to Mobile clients. We had reports of timeouts during development so we have added a concept of a request_id ...
2
votes
0answers
348 views

nginx 2 symfony2 web application, one ip no domain

I have irritating with nginx. I set up in /usr/share/nginx/www/firstapp one application and in /usr/share/nginx/www/secondapp. in my default conf i setup that in / root localization i want first ...
2
votes
0answers
259 views

Nginx HttpSecureLinkModule and IP restricted hashes not working sometimes

Im using the nginx module HttpSecureLinkModule to protect resources from being hotlinked with expiring hashes which use user's IP address to make a hash that will only work for them, on top of ...
2
votes
0answers
374 views

Nginx as a proxy doesn't allow to access backend (Apache) content which is password protected

I have apache as a backend and nginx as a frontend. Some content is password-protected by Apache (HTTP Auth). When I access it directly - everything works fine, bur when I try it through nginx - ...
2
votes
0answers
1k views

nginx sticky sessions / ip_hash with Socket.io

I am to be load balancing two node.js/Socket.io instances on different boxes with nginx running a simple notifications service with a retroactive event for new clients. I don't think there will be ...
2
votes
0answers
774 views

Nginx doesn't seem to stop correctly

I'm using the following script to start/stop nginx: #! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # ...
2
votes
0answers
986 views

Nginx subdomain redirects to domain, what's wrong?

I've got a server with serveral domains under Nginx running fine (WordPress blogs). Now I want to setup a phplist server and locate it under one subdomain, but although I thought I configured the ...
2
votes
0answers
539 views

nginx equivalent to Apache MultiViews?

If you put this in your .htaccess file Options MultiViews and you have these files stuff/ howto.html index.php items.php then all of these web addresses work /stuff/ # ...
2
votes
0answers
266 views

How to run script only if load balancer is NOT routing requests to it via bash script?

I have 4 cloud instances. First is a load balancer (LB), and then 2 instances with the identical setup holding the application code (APP1 & APP2). And finally, I have a database instance (DB). ...
1
vote
0answers
12 views

Social networks and Cloudflare free SSL

Let me expose my setup and problems. Maybe some of you will have ideas for me to test. Setup On Digital Ocean : I have one web server running a web site with NGINX in the front (Ruby on Rails ...
1
vote
0answers
9 views

nginx proxy_buffering and send response to client immediately

To break the question down to one sentence: Is it Possible to turn on proxy_buffering in nginx, but sending the response of the backend server immediately to the client when the client is fast enough ...
1
vote
0answers
19 views

nginx spam 404 errors

My server is spammed by multiples XXX domains, there is a lot of 404 errors in my logs and i can't find the solution to stop that. 2015/07/31 09:13:20 [error] 7070#0: *610 open() ...
1
vote
0answers
22 views

Nginx cant write in folder

I cant get wordpress to write on wp-content. According to my nginx.conf: user www-data; Then I just did: chown -R www-data /var/www/blog/wp-content And check everything was correct: ...
1
vote
0answers
46 views

chrome requests get stuck pending

Description of issue We have a web server that is serving static assets. We are experiencing a problem where after you browse around some of the http requests get stuck in the "pending" state. In the ...
1
vote
0answers
17 views

Nginx only allow directory endings, no index.html or index.php

Working on setting up an nginx server. I want to add some sort of location block that would only allow the parent folder of index.html or index.php to be served, but would redirect index.html or ...
1
vote
0answers
8 views

Nginx: Logging 403's from proxies

So our server setup goes like this: www <-> nginx <-> backend services The internal services require authorisation, which often fails with a 403 if a user's token is incorrect and so ...
1
vote
0answers
11 views

Apache/nginx: pinned client certificates and FastCGI

Is it possible to have Apache or nginx accept only pinned client certificates and pass knowledge about the client's certificate to a FastCGI response handler?
1
vote
0answers
41 views

Nginx and Apache setup with php-fpm issues. Random nginx bad gateway

I have inherited a server in which the previous administrator seemed to be using a combination of nginx and apache. I am not sure why the combination, other than someone thought nginx is being used ...
1
vote
0answers
35 views

Nginx rewrite rules for all vhosts

I have a huge referer blacklist with that I want to stop referer spam on all my websites (https://perishablepress.com/blacklist/ultimate-referrer-blacklist.txt). Currently I have to change all my ...
1
vote
0answers
19 views

Nginx domain to subdomain redirection

I want to redirect all the traffic from example.com to test.example.com and I have written following rule for that : server { server_name example.com; # change to match your URL return 301 ...
1
vote
0answers
34 views

JSF stylesheets missing with nginx

I developed a simple JSF application, using Glassfish4 as the application server. Currently it has only one page with administration things. When I run this on localhost everything seems to be in ...
1
vote
0answers
31 views

Nginx: Optimal map_hash_max_size and map_hash_bucket_size for 1M map?

I have 1M static rewrite rules and using this map configuration. How to determine the optimal values for map_hash_max_size and map_hash_bucket_size? I want to optimize for memory consumption. The ...
1
vote
0answers
45 views

Application layer firewall for WebSockets?

My team has built an intranet portal in Amazon AWS for a client, and on it, we have used WebSockets to do things like notifications and other minor stuff. We mostly send events from the server, but we ...
1
vote
0answers
32 views

Nginx - How to authorize access to repositories using python script

I have set up a local Git server using Nginx ( in Ubuntu ) ,Now I want to authorize users using external python script , which should authorize them against predefined database . AFAIK, I have to ...