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

6
votes
0answers
469 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 ...
6
votes
0answers
2k 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 ...
5
votes
0answers
2k views

nginx recv() failed (104: Connection reset by peer) while reading response header from upstream

I have recently upgrade my magento from 1.5 to 1.9 and when ever I add a certain product to basket, I started to receive this error: 502 Bad Gateway There were no log entries in the var/log/ folder: ...
4
votes
0answers
45 views

Nginx forward tls based on domain

Is it possible to forward some tls requests based on their domain name to another server (via nginx)? I have a public nginx server which serves some pages via http and https (in the image b.com). ...
4
votes
0answers
243 views

Rails 4 Unicorn+Nginx on Ubuntu 13.04 VPS keeps crashing

I bought a years subscription at bluevm.com (found some coupon code, it was only about $15 for a whole year) to launch my first Rails Production server. I'm running Nginx with Unicorn and MySQL on ...
4
votes
0answers
895 views

Nginx returning 408 error with XHR2 file uploads during mid-upload

A customer of mine is trying to upload a file to our remote nginx webserver via a form POST using XHR2 form data (and a cross-domain request with CORS). During mid-upload, the webserver returns a 408 ...
4
votes
0answers
847 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 ...
4
votes
0answers
2k views

Nginx as reverse proxy: how to properly configure gateway timeout?

We have configured Nginx as a reverse proxy to an Apache server farm, but I'm running into trouble with the gateway timeouts. Our Goal in human readable form is: "Deliver a request within one second, ...
4
votes
0answers
615 views

NGINX mod _proxy_html available?

Somebody created already a similar http://apache.webthing.com/mod_proxy_html/ mod_proxy_html module for Nginx? I think the closest module would be http://wiki.nginx.org/HttpSubsModule but I have no ...
3
votes
0answers
44 views

Suddenly started experiencing enormous wait times before requests hit server

Our web app has been getting 20k-30k views a day, and steadily growing. About 4 days ago we suddenly started seeing wait times of 30-40 seconds before the HTML was even being delivered, on pages that ...
3
votes
0answers
53 views

Nginx - SSL forward secrecy and iOS9 support

I'm trying to bring a couple of Linux web servers into line with the current recommendations for SSL - in particular for allowing iOS9 to connect. One server is CentOS 7, the other CentOS 6.4. I have ...
3
votes
0answers
34 views

Regex location block not working in NGINX

I have a pretty simple location block in my nginx conf that looks like this: location ~* ^\/[a-z0-9]{24}$ { // do some things } I'm attempting to catch urls that end in a Mongo ObjectId. eg: ...
3
votes
0answers
19 views

Only log rate limit violations in nginx

Before enforcing per IP rate limits I wonder if there is a mode to only log violations without actually blocking clients. Therefore I could easilly check after some time that those parameters were ...
3
votes
0answers
71 views

Nginx, CakePHP: Error: Create the class Index.phpController below in file: App/Controller/Index.phpController.php

I've config nginx 1.4 for running cakephp 2.6, but it can't work. For every page, for example http://my-app/ or http://my-app/admin it always return the error: Error: Create the class ...
3
votes
0answers
121 views

Query string parameters get shuffled

We're observing some strange behavior of the data send to our systems from a javascript since 9/9/2015. The problem shows up when the query string is send to our servers. Some values of the ...
3
votes
0answers
60 views

NGINX Worker Process, Burst Read Speed to only 1918kb/s

I am running an NGINX/1.8 server on Centos6.6 with multiple worker_processes, however while observing iotop I notice they burst up to 1918kb/s Read speed and rarely if at all pass that limit. I want ...
3
votes
0answers
184 views

Nginx: strip cookie from cached content

Trying to replace Apache by Nginx as a web proxy in front of some Tomcat servers, dealing with Set-Cookie JSESSIONID is proving to be challenging. Our Tomcat content is served with Cache-Control and ...
3
votes
0answers
115 views

Nginx setup on aws - redirecting to port 81, cannot reverse

I've tried to setup nginx on my free AWS instance so that it can host multiple domains on single ip address (not sure if it can be managed, but I'm trying to dig in). In that process I created ...
3
votes
0answers
88 views

nginx error log :r eturned busy again while sending response to client,

I got lots of errors in my nginx errorlog as following: 2015/04/28 20:05:32 [alert] 67449#0: *29938935 sendfile(/var/www/images/201504/13/210123jpt6cpjj6r1g2upt.jpg) returned busy again while sending ...
3
votes
0answers
333 views

start nginx despite missing upstream

I like to run nginx as a local proxy server, serving stale cache files if the upstream server is unavailable. This works well, except the local machine is restarted, while the internet connection ...
3
votes
0answers
2k views

Unable to apt-get install nginx-extras package on top of nginx 1.7.9

I am attempting to install Phusion Passenger for nginx on a dev Ubuntu box following this guide from the passenger website. I have Nginx installed and running already, version is 1.7.9-1~trusty. I ...
3
votes
0answers
166 views

fcgi to serve static files with nginx

Maybe I'm wrong, so before to ask my question, I'll explain a little what I'm trying to set up : I've a VPS where I want to have multiple users sites, with permission denied to all users to see the ...
3
votes
0answers
4k 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] ...
3
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 ...
3
votes
0answers
666 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
19 views

How to maximize utilization of fluentd server?

I have a fluentd server that is processing an average of 1000 req/s. This server is composed by 32 cpus. In this server are running 32 fluentd docker containers with the same configuration. The entry ...
2
votes
0answers
26 views

Any versions of ModSecurity that works with recent versions of Nginx?

I'm building Nginx and ModSecurity together in order to use the OWASP- Core Rule Set Project. According to the modsecurity download page, the latest version of modsecurity (2.9.1) is not stable when ...
2
votes
0answers
31 views

HSTS exclude specific subdomain with “includeSubdomains”

I'm using HSTS with this header on my website: Strict-Transport-Security: max-age=15768000; includeSubDomains This works as intended and forces the browser to redirect all http connections to ...
2
votes
0answers
24 views

502 Bad Gateway Error - exited on signal 11

I have an issue on a particular Magento store, on two different servers. The issue is that when I save admin panels, I get a 502 error. The values actually save to the database, as pressing back on ...
2
votes
0answers
23 views

How to distinguish between internal error code 502 and upstream returned http_502 on a nginx proxy

We use nginx as a http proxy server.The following configuration: location / { proxy_pass_header Server; proxy_pass $scheme://$http_host$request_uri; } When urls proxied return error code ...
2
votes
0answers
32 views

Nginx: How To Completely Disable Request Body Buffering

I'm trying to set up Madsonic on my Ubuntu box and have Nginx run in front of it. Problem is, I keep getting this warning when I try to upload stuff through the web interface: 31115#0: *14 a client ...
2
votes
0answers
57 views

Nginx reverse proxy with dynamic port forwarding

I'm setting up a reverse proxy on Nginx. I need it to listen to multiple ports. I then would like to hit the exact same port on the backend server. Like this: http://frontendserver:9000 -> ...
2
votes
0answers
74 views

Forward Kerberos Authentication on Ansible

I have an ansible control machine (host-A) that need to talk with host-C, an Windows machine that doesn't have local users (It's an Active Directory). host-A doesn't have network access to host-C, ...
2
votes
0answers
51 views

PHP-FPM random timeout crashes

Similar questions have been asked about this but none have seemed to shed any light on this issue. I am using PHP 5.6.18 on Ubuntu 14.04. The server its on is an in-office server with an 8 core CPU ...
2
votes
0answers
29 views

nginx limit connections based on parameters

My website is a forum, and it has 3 type of URLs as below: Thread view: forum.php?mod=viewthread&tid=1256&page=2 Thread List: forum.php?mod=forumdisplay&fid=125&page=61 Display ...
2
votes
0answers
74 views

Combined redirects in Nginx

We are using Nginx and want to reduce the number of "chained" redirects we have. So, for example: URL A - http://www.sitename.co.uk/SHOPPING-CATEGORIES/product_name redirects to its https version ...
2
votes
0answers
76 views

Which permissions should I set to dhparam.pem?

I am generating Diffie-Hellman parameters for the ssl_dhparam directive in the SSL configuration of nginx. The file dhparam.pem is created with the command openssl dhparam 2048 -check -out ...
2
votes
0answers
99 views

Set CORS headers on nginx

Addresses like http://vpsxxx.ovh.net/g/search?q=ok or http://vpsxxx.ovh.net/so/questions/34738694/how-to-move-items-on-the-screen-for-a-game-using-javascript are proxied well, when trying them from ...
2
votes
0answers
60 views

How to config nginx and uwsgi to cache a url any way?

Update2: add uwsgi_ignore_headers Cache-Control Set-Cookie X-Accel-Expires Expires Vary; and problem solved. Thanks everyone. Update: I tried uwsgi_ignore_headers Cache-Control Set-Cookie ...
2
votes
0answers
71 views

Nginx proxy_pass to upstream uses sometimes IPv6 address

Why does Nginx proxy_pass to upstream send sometimes outgoing requests to IPv6? 2015/12/28 14:11:06 [error] 38194#0: *114469948 connect() failed (111: Connection refused) while connecting to ...
2
votes
0answers
93 views

Getting 404 on any text file (including robots.txt) with nginx

I recently moved my CentOS 7 machine from an Apache web server to an nginx web server, and I'm still working out various issues as I learn the in's and out's of nginx. One issue I have stumbled upon ...
2
votes
0answers
116 views

Is this an nginx proxy_cache bug?

I have a very simple proxy config: http { proxy_cache_path /var/www/cache levels=1:2 keys_zone=s3-images-cache:50m inactive=1M max_size=1000m; proxy_temp_path /var/www/cache/tmp; server ...
2
votes
0answers
104 views

Haproxy Nginx/Naxsi to Web servers not working

I have a haproxy/nginx/naxsi setup for load balancing and security. Traffic is supposed to come into haproxy then to nginx/nasxi then finally to the web servers if they passed the WAF. We also have a ...
2
votes
0answers
79 views

HTTP DELETE timeout between Nginx and Application

We're facing a really weird error using HTTP DELETE, the symptom is occasionally the user gets a 504 (timeout) error in the browser. The requests flow through the steps described below: Browser -> ...
2
votes
0answers
32 views

How to reload nginx config only on part of workers?

Is there any way to prevent nginx from reloading configuration on all workers at the same time? I have configured some really short timeouts, so doubling number of workers processes when load is high ...
2
votes
0answers
145 views

Nginx and buffering of big responses

In our application's configuration, nginx acts as a reverse proxy in front of gunicorn. Our application replies to frontend requests with generally speaking, small responses... but some endpoints ...
2
votes
0answers
72 views

Got 504 Timeout in 200ms. What does that mean?

I have a website. Using Nginx and Spring. Today, some of APIs got 504 gateway timeout, but these time-out return instantly. I suppose a time-out error should be returned after a period of time. So, ...
2
votes
0answers
660 views

Unknown NGINX open socket alerts

I am new to Nginx. When I checked the error log I see this alerts going on for very long. Should I be concerned? 2015/09/24 15:13:57 [alert] 2416#0: *0 open socket #273 left in connection 178 ...
2
votes
0answers
52 views

NGINX Reverse Proxy redirect settings

I have the following scenario: NGINX | | JavaEE TERMINATING | -> REVERSE PROXY -> | Application SSL (443) | HTTP | Server Reverse proxy is done by: ...
2
votes
0answers
433 views

php5 not working with nginx 1.9.3

I am new to nginx, and having some trouble with php5. (I had it sorta working, but cant seem to get it working again.) There are 2 files I am woring with, that seem to control nginx, and php5-fpm. ...