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

5
votes
0answers
2k views

Why does Nginx's proxy_intercept_errors directive require a rewrite to work properly?

Following is a sample Nginx server configuration. Without the "magical talisman" location block, proxied error content results in an Nginx 404 page rather than the customized error page being served. ...
4
votes
0answers
28 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
396 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 ...
4
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
232 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
848 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
767 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

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 ...
4
votes
0answers
592 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
23 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
17 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
40 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
119 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
54 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
143 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
98 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
76 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
274 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
1k 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
148 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
3k 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
616 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
51 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
38 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
44 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
67 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
87 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
65 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
64 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
26 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
61 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
417 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
44 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
294 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. ...
2
votes
0answers
62 views

Nginx and Cross Subdomain Cookies

TLDR: How to share cookies between subdomains for a backend application sever that I cannot "configure" using nginx as a proxy - some magical combination of proxy_*? A tornado web server is running ...
2
votes
0answers
45 views

nginx, php-fpm, and subfolders

First dive into nginx. Possible lack of googlefoo/stack skills. This should be super easy to solve but I'm really struggling with nginx's config. I have yet to find documentation that makes sense ...
2
votes
0answers
44 views

Block an user-agent in Nginx except those coming from a specific IP

I'm trying to figure out the best way to block an user-agent in Nginx except those comming from a specific IP. I have a solution that seems to work, but I would like to know if there is a better ...
2
votes
0answers
848 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 ...
2
votes
0answers
216 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 ...
2
votes
0answers
93 views

Nginx -s quit does nothing after 1.8 upgrade, how can I debug and/or find the issue?

The premise of this question is unfortunately vague but I can't pinpoint a more specific issue. I upgraded a machine from nginx 1.6.3 to 1.8 and now issuing a nginx -s quit does literally nothing. The ...
2
votes
0answers
45 views

NginX proxy_read_timeout TCP connection status

When NginX is configured as a reverse proxy and gives up waiting for the following reasons proxy_read_timeout proxy_connect_timeout proxy_send_timeout it sends a 504 gateway timeout to the ...
2
votes
0answers
322 views

nginx try_files redirect using wrong scheme when behind SSL termination load balancer (haproxy)

I have an nginx 1.6.2 server running as a backend behind a load balancer that does SSL termination. All communication to the backend servers goes over HTTP. Diagram of what's going on: ...
2
votes
0answers
338 views

Very slow upload speed with nginx proxying apache

I have a nginx server proxying apache on my server, and the setup has been running fine... Until yesterday, when I found out that, actually, uploading a file using a PHP script is very slow. Since ...
2
votes
0answers
160 views

How to let Corosync / pcs control nginx?

Folks, I'm trying to replace a single aging load balancer with multiple virtual machines running nginx. However after I got centos 7 and nginx installed I realized that heartbeat has been ...
2
votes
0answers
255 views

reverse proxy issues with nginx over apache2.4 hosting joomla: url rewrite does not work any more

I am setting up a joomla 3.x site with apache 2.4 on an ubuntu 14.04 server on aws ec2. That alone is fine with url rewrite working fine. I have cleared all apache issues before freeing the port 80 ...
2
votes
0answers
467 views

Roundcube, upload fail

I have Roundcube installed on Ubuntu 14.04, using NGINX, with static IP, SpamAssassin, ClamAV . Sending/receiving email was fine including downloads, however cannot upload anything to send. ...
2
votes
0answers
349 views

Execute lua script after getting response from proxy pass

I have nginx block which proxy passes the request to different load balancers based on the request by first calling a lua script. location / { set $provider_key null; set $cached_key null; set ...
2
votes
0answers
3k 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 ...
2
votes
0answers
295 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 ...