Questions tagged [nginx]

Nginx ("eNgine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

Nginx is a web server and mail proxy known for its high performance and small resource footprint. It is used in many places as a replacement to Apache and also as a front end server to static content or reverse proxying. Nginx is developed under a BSD-like license by Kazakhstani developer Igor Sysoev.

Nginx comes with diverse modules that enable it to perform various different tasks such as load balancing, URL rewriting, request rate limiting, content compression, raw TCP proxying and integration with tools like memcached or scripting languages like Lua.

Nginx is being used by some of the worlds busiest sites like WordPress, Sourceforge, Github and Reddit. Its market share has been raising from 7% in 2008 to over 30% as of June 2016 according to W3techs statistics.

After nine years of development, Nginx 1.0 stable was released on April 2011.

17017 questions
5
votes
2 answers

php-fpm use a lot of cpu

I use wordpress on Ubuntu 12.04 with Nginx + php-fpm on my VPS. There are 2 CPU cores + 4096Mb memory. I've moved mysql database to another server and set remote access. There are about 300 online visitors at once and php-fpm uses really a lot of…
Andrei Nikolaev
  • 95
  • 1
  • 2
  • 5
5
votes
1 answer

NGINX - CORS error affecting only Firefox

this is an issue with Nginx that affects only firefox. I have this config: http://pastebin.com/q6Yeqxv9 upstream connect { server 127.0.0.1:8080; } server { server_name admin.example.com www.admin.example.com; listen 80; …
wiherek
  • 181
  • 1
  • 1
  • 6
5
votes
1 answer

nginx sending incomplete response

Without restart or modification of config, nginx is sending incomplete responses sometimes. Today, I could reproduce well, but still don't know what's wrong or how to fix. I put a 5MB file to the site's location/alias path that nginx is configured…
ledy
  • 565
  • 1
  • 6
  • 15
5
votes
1 answer

nginx: understanding the purpose of auth_http (IMAP proxy)

I would like to send IMAP client requests to an IMAP back-end via an nginx proxy. According to the the mail_auth_http module, a directive auth_http has to be used in order to authenticate the clients. But what exactly is the purpose of auth_http,…
watain
  • 151
  • 1
  • 3
  • 14
5
votes
1 answer

Nginx & fcgiwrap, logging perl errors to error log

This is similar to this question, which got no responses: How to debug CGI over fcgiwrap/nginx How do I get perl errors to be automatically placed in the nginx error log? Right now, when there is any perl error, the following message goes in the…
Bintz
  • 395
  • 1
  • 2
  • 10
5
votes
2 answers

Nginx: rewriting https:// to http://

I'm trying to get Nginx to rewrite incoming requests to a site my server prefixed with https:// to http:// (this is because a CMS used on this site forces URIs instead of relative paths -- essentially breaking the whole site by making images,…
user3620306
  • 53
  • 1
  • 1
  • 4
5
votes
1 answer

How to apply the same rules to several locations with Nginx?

In a project I have very large nginx configuration with a lot of redundant lines. The current state is like the following location ~ /loc1/ { common rules; } location ~ /some/other/location/ { common rules; } location ~ /yet/anotherone { …
PhilippN
  • 63
  • 1
  • 3
5
votes
2 answers

Use nginx reverse proxy for redirection

I have a.b domain (for example) and want to serve some github pages (username.github.io/project) in a.b/c. It means that I also want to keep my browser url to a.b/c and showing contents of username.github.io/project. I have following settings in…
Jongsu Liam Kim
  • 161
  • 1
  • 1
  • 6
5
votes
1 answer

Out-of-order chef recipes causing apt package install to fail

I'm writing a Chef recipe to install among other things nginx and Phusion Passenger. The short summary is that the recipes on my run list are not executing in the order I expect, and that's causing an apt package installation to fail in a way I…
5
votes
1 answer

Why can't nginx have more than 75 seconds proxy connect wait?

According to this doc here, nginx proxy_connect_timeout cannot have more than 75seconds delay. I know its terrible to have an app with that delay, but I am being curious why this exact value?
5
votes
1 answer

nginx + uwsgi - what is serving static files?

I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app. server { listen 80; server_name test.myapp.com www.test.myapp.com; charset utf-8; …
reptilicus
  • 153
  • 1
  • 1
  • 5
5
votes
1 answer

Nginx location regex is not matching

The following has been working to cache css and js for me: location ~ "^(.*)\.(min.)?(css|js)$" { expires max; } results: $ curl -I http://mysite.com/test.css HTTP/1.1 200 OK Server: nginx Date: Thu, 16 Jan 2014 18:55:28 GMT Content-Type:…
Chris Montanaro
  • 830
  • 1
  • 7
  • 8
5
votes
1 answer

Preserve response headers in NGINX load balancer

I have set up NGINX as a load balancer for two Domino servers this way: http { upstream www.mydomain.com { server 1.1.1.1; server 2.2.2.2 backup; } server { listen 80; server_name www.mydomain.com; …
Panu Haaramo
  • 343
  • 7
  • 20
5
votes
3 answers

Different PHP-configs in Nginx

I have a web-server running multiple server (virtual hosts) using nginx and fastcgi passing to a unix-socket. What I want to accomplish is a set-up with beta.example.com and live.example.com, where the live site has error_reporting turned off (but…
kd35a
  • 151
  • 1
  • 5
5
votes
2 answers

How do I hide directory listing with nginx without showing 403 message

please, help me configure nginx so that it will hide files and directories from directory listing. Setting "Autoindex off" is not an option because nginx starts showing 403 error message. What I need is sort of a blank page with a directory name.…
Mariya
  • 51
  • 1
  • 1
  • 2