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

Nginx dynamic upstream configuration / routing

I was experimenting with dynamic upstream configuration for nginx and cant find any good solution to implement upstream configuration from third-party source like redis or mysql. The idea behind it is to have a single file configuration in primary…
Dan Sosedoff
  • 247
  • 2
  • 4
  • 11
5
votes
1 answer

Best way to deploy my node.js app on a Varnish/Nginx server

I am about to deploy a brand new node.js application, and I need some help setting this up. The way my setup is right now is as follows. I have Varnish running on external_ip:80 I have Nginx behind running on internal_ip:80 Both are listening on…
Saif Bechan
  • 10,960
  • 10
  • 42
  • 63
5
votes
3 answers

After setting up Elastic Load balancer my https doesn't work anymore. Nginx error

I have a regular instance that works fine when not behind a load balancer. I set up an ELB with 80 forwarding to 80 and 443 forwarding to 443 and sticky sessions. Afterward I receive this error when going to any https page. The plain HTTP request…
jchysk
  • 319
  • 1
  • 5
  • 13
5
votes
2 answers

Nginx Retry of Requests ( Nginx - Haproxy Combination )

I wanted to ask about Nginx Retry of Requests. I have a Nginx running at the backend which then sends the requests to HaProxy which then passes it on the web server and the request is processed. I am reloading my Haproxy config dynamically to…
vaibhav
  • 121
  • 2
  • 4
5
votes
3 answers

Is it possible to have multiple subdomain levels with DNS and Nginx?

This seems like a simple question, but after some Google searching I can't seem to find the answer. I have a staging server where I would like to mimic the production server as much as possible. Let's say I own example.com and I decide that I want…
Stephen Watkins
  • 539
  • 2
  • 5
  • 11
5
votes
2 answers

How to tell nginx to serve https only for one vhost-managed domain?

I have an ec2 instance running ubuntu and nginx 0.8.4, with vhosts serving several different domains using http but one using SSL/https. Secure domain configuration: server { listen 443 ssl; server_name "securedomain.tld"; …
NiKo
  • 153
  • 1
  • 5
5
votes
5 answers

How to proxy requests to an internal server using nginx?

I have setup a web server to view my repositories (a Gitalist instance) on http://localhost:3000 and I want to setup a proxy using nginx. I want that the request is proxied to my repository view when receiving a URI like DOMAIN/git/. My current…
eliocs
  • 197
  • 1
  • 2
  • 9
5
votes
1 answer

nginx with Memcache Vs Varnish

I was wondering if anyone has any comments / benchmarks / suggestions on Varnish Vs Memcache when used to serve content (usually 2-5kb JS file depending on the parameters in request; thousands of diff files are possible) Currently we are using nginx…
Sparsh Gupta
  • 1,127
  • 7
  • 21
  • 31
5
votes
1 answer

nginx redirects back to remote_addr IP

I am trying to setup nginx 1.0.12 as a proxy for apache 2.2.15, but faced a strange problem. And I cannot solve it for third day in a row. I have test site c-craft.info and have installed roundcube in /roundcube subdirectory. So here is the…
5
votes
1 answer

Only serve requests to a specific domain?

I'd like to only server requests that are made to a specific domain and just drop everything else or give it 404. Would prefer to see it done through nginx but would of course like the best solution.
mhenrixon
  • 153
  • 1
  • 1
  • 5
5
votes
1 answer

gzip compression doesn't work in nginx reverse proxy setup

We have nginx in front of an Apache server in reverse proxy mode. We initially had Apache compressing files using mod_deflate, however that proved to cause problems with some instances of Internet Explorer. My guess is that there was some strange…
Oz Solomon
  • 365
  • 2
  • 3
  • 12
5
votes
2 answers

Setting REMOTE_USER for Trac in Gunicorn behind Nginx

I want to run Trac in Gunicorn, behind Nginx. Nginx handles user authentication via LDAP (which works), but I can't get the REMOTE_USER passed to Trac. For uWSGI I would configure Nginx like this (tested and it works): uwsgi_param REMOTE_USER…
Jan Fabry
  • 926
  • 1
  • 11
  • 18
5
votes
2 answers

Denying folder in Nginx causing PHP-FPM to not take precedence

The title says it all, but I have a very interesting problem that I am quite confused on. Basically, I have a simple WordPress installation, and I wish to deny a folder (along with all files in the folder), let's say…
Taylor Jasko
  • 696
  • 4
  • 13
5
votes
2 answers

Optimize php-fpm and varnish for a powerful server

My setup is Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second according to blitz.io varnish starts giving out timeouts.…
Jim
  • 410
  • 4
  • 14
5
votes
0 answers

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 clue how I should configure this to rebuild the…
heuri
  • 81
  • 2
  • 8