Questions tagged [nginx]

Nginx is a web and proxy server. Note that questions on the use and configuration of server software may be off-topic and subject to closure if they do not directly involve a programming context. Other Stack Exchange sites such as Super User, Server Fault, or Webmasters may be more appropriate places to ask such questions.

Nginx ("engine x") is a lightweight and high-performance HTTP , and , released under a BSD-like license.

From the nginx wiki:

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 12.18% (22.2M) of active sites across all domains. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

Resources:

Useful Links

Talks

Tengine

54687 questions
12
votes
1 answer

How do I configure nginx as proxy to jetty?

I've been trying to set up nginx as proxy to jetty. I want to do something as explained in this answer but for Jetty not ring. I've created a .war and I placed it in ~/jetty/jetty-dist/webapps/web_test-0.1.0-SNAPSHOT-standalone.war Say, I want to…
Zeynel
  • 13,145
  • 31
  • 100
  • 145
12
votes
4 answers

How do I Disable the Code Cache for PHP 5 (FPM) with Nginx?

When I save changes to a PHP file and then reload, it continues to execute the old version of the script for a minute or so regardless of how many refreshes I do. After 1 minute (or so) it executes the current version. How do I disable this…
Nick
  • 10,904
  • 10
  • 49
  • 78
12
votes
1 answer

Ansible Playbook to run Shell commands

I recently dived into Ansible for one of my servers, and found it really interesting and time saving. I am running an Ubuntu dedicated server and have configured number of web applications written on Python and a few on PHP. For Python I am using…
Rai Ehtisham
  • 151
  • 1
  • 2
  • 11
12
votes
2 answers

nginx managed SSL with Tomcat 7

What is the proper configuration in server.xml to have nginx manage SSL? My current configuration results in a "redirect loop" unless I mark the tomcat standard connection "secure" which is not what I want. My app requires https for all requests…
user979051
  • 1,257
  • 2
  • 19
  • 35
12
votes
5 answers

Starting or restarting Unicorn with Capistrano 3.x

I'm trying to start or restart Unicorn when I do cap production deploy with Capistrano 3.0.1. I have some examples that I got working with Capistrano 2.x using something like: namespace :unicorn do desc "Start unicorn for this application" …
kaplan
  • 4,109
  • 6
  • 30
  • 35
12
votes
1 answer

Mapping a url path to a server in nginx

How can I map a URI of the form staging.example.com/siteA to a virtual server located at /var/www/siteA? The main restriction is that I do not want to create a subdomain for siteA. All examples of nginx.conf I've seen so far rely on having a…
Bernard
  • 16,149
  • 12
  • 63
  • 66
12
votes
2 answers

How to not log a get request parameter in the nginx access logs?

I require access logs enabled, but for compliance reasons, cannot log a sensitive GET request parameter's data in the access logs. While I know, I could parse the logs (after-the-fact) and sanitize them, this is not an acceptable solution --…
Domino
  • 361
  • 1
  • 2
  • 7
12
votes
1 answer

Does Nginx have separate queuing mechanism for requests?

Consider the following situation: you are deploying application that can serve 1 req./sec. What would happen if I send 10 request in 1 second? I wrote simple app to test that: https://github.com/amezhenin/nginx_slow_upstream . This test shows that…
Artem Mezhenin
  • 5,539
  • 6
  • 32
  • 51
12
votes
4 answers

Nginx serving SSL certificate of another site

I'm serving two sites with Nginx. First site (say A) has a SSL certificate and second site (say B) doesn't. Site A works fine when opening on https and B on http. But when I access site B on https, nginx serves the SSL cert and contents of site A…
vivekagr
  • 1,786
  • 15
  • 23
12
votes
2 answers

Nginx: allow access only to referrer that match location name

Is there a way, in nginx, to allow access to a "location" only to clients with a referrer that matches the current location name? This is the scenario: http://foooooo.com/bar.org/ http://foooooo.com/zeta.net/ etc etc I want the contents of the…
Vincenzo Petrucci
  • 843
  • 1
  • 8
  • 15
12
votes
1 answer

Proxy a Flask app running on gunicorn to a subpath in nginx

I have a Flask app running with gunicorn on http://127.0.0.1:4000: gunicorn -b 127.0.0.1:4000 webapp:app Now I would like to use nginx as a reverse proxy and forward http://myserver.com/webapp to http://127.0.0.1:4000 in a way that every…
Martin Preusse
  • 9,151
  • 12
  • 48
  • 80
12
votes
3 answers

Have you managed to make your node nginx proxy setup on Heroku work?

Have you managed to make your node + nginx proxy setup on Heroku work? Could you, please, tell me how have your organized the directories structure and the files in each directory before doing "git push heroku master"? Which buildpack did you use? I…
T900M
  • 149
  • 2
  • 5
12
votes
2 answers

Python: uWSGI configuration for NGINX+FLASK

I successfully managed to install: NGINX + uWSGI + Flask on a CentOS 6.x server but I still have some doubts in terms of configuration: 1) I am running NGINX as a service: service nginx start/stop/restart if I type "ps aux | grep nginx", I can see 2…
Daniele B
  • 19,801
  • 29
  • 115
  • 173
12
votes
1 answer

Is it possible to deny range of IPs on Nginx

Is it possible to deny range like 43.249.64.0-43.249.85.255? Or only by mask like 43.249.64.0/19 which includes up to 43.249.95.255 which makes it not good decision.
Igor Yavych
  • 4,166
  • 3
  • 21
  • 42
12
votes
2 answers

Unknown error nginx

I have two configuration files for nginx both in my sites available folder. Both of them are listening on the same port (80), however I can not restart Nginx, I believe there's an error. When I tried to reload Nginx, I received this error: nginx:…
user1076821