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
3178
votes
42 answers

From inside of a Docker container, how do I connect to the localhost of the machine?

I have a Nginx running inside a docker container. I have a MySql running on the host system. I want to connect to the MySql from within my container. MySql is only binding to the localhost device. Is there any way to connect to this MySql or any…
Phil
  • 46,436
  • 33
  • 110
  • 175
1135
votes
12 answers

Node.js + Nginx - What now?

I've set up Node.js and Nginx on my server. Now I want to use it, but, before I start there are 2 questions: How should they work together? How should I handle the requests? There are 2 concepts for a Node.js server, which one is better: a.…
Van Coding
  • 24,244
  • 24
  • 88
  • 132
636
votes
8 answers

Nginx -- static file serving confusion with root & alias

I need to serve my app through my app server at 8080, and my static files from a directory without touching the app server. # app server on port 8080 # nginx listens on port 8123 server { listen 8123; …
treecoder
  • 43,129
  • 22
  • 67
  • 91
574
votes
19 answers

Nginx no-www to www and www to no-www

I am using nginx on Rackspace cloud following a tutorial and having searched the net and so far can't get this sorted. I want www.mysite.example to go to mysite.example as normal in .htaccess for SEO and other reasons. My…
TheBlackBenzKid
  • 26,324
  • 41
  • 139
  • 209
441
votes
10 answers

Where can I find the error logs of nginx, using FastCGI and Django?

I'm using Django with FastCGI + nginx. Where are the logs (errors) stored in this case?
ha22109
  • 8,036
  • 13
  • 44
  • 48
403
votes
15 answers

(13: Permission denied) while connecting to upstream:[nginx]

I am working with configuring Django project with Nginx and Gunicorn. While I am accessing my port gunicorn mysite.wsgi:application --bind=127.0.0.1:8001 in Nginx server, I am getting the following error in my error log file; 2014/05/30 11:59:42…
Mulagala
  • 8,231
  • 11
  • 29
  • 48
391
votes
33 answers

NGinx Default public www location?

I have worked with Apache before, so I am aware that the default public web root is typically /var/www/. I recently started working with nginx, but I can't seem to find the default public web root. Where can I find the default public web root for…
user1405298
373
votes
23 answers

nginx - nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

All of a sudden I am getting the below nginx error * Restarting nginx * Stopping nginx nginx ...done. * Starting nginx nginx nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98:…
Tampa
  • 75,446
  • 119
  • 278
  • 425
333
votes
16 answers

upstream sent too big header while reading response header from upstream

I am getting these kind of errors: 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header while reading response header from upstream, client: 107.21.193.210, server: aamjanata.com, request: "GET…
Vidyut
  • 3,489
  • 2
  • 13
  • 10
325
votes
27 answers

nginx error connect to php5-fpm.sock failed (13: Permission denied)

I update nginx to 1.4.7 and php to 5.5.12, After that I got the 502 error. Before I update everything works fine. nginx-error.log 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while…
peter
  • 3,272
  • 3
  • 15
  • 11
319
votes
4 answers

Nginx location priority

What order do location directives fire in?
user650505
  • 3,791
  • 4
  • 17
  • 7
309
votes
25 answers

How to clear the cache of nginx?

I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones. I have tried to restart nginx, to no success and I have Googled, but not found a valid way to clear it. Some articles say we can just delete…
Freewind
  • 193,756
  • 157
  • 432
  • 708
306
votes
32 answers

Kubernetes service external ip pending

I am trying to deploy nginx on kubernetes, kubernetes version is v1.5.2, I have deployed nginx with 3 replica, YAML file is below, apiVersion: extensions/v1beta1 kind: Deployment metadata: name: deployment-example spec: replicas: 3 …
Pankaj Jackson
  • 3,521
  • 3
  • 15
  • 19
289
votes
21 answers

Nginx 403 error: directory index of [folder] is forbidden

I have 3 domain names and am trying to host all 3 sites on one server (a Digital Ocean droplet) using Nginx. mysite1.name mysite2.name mysite3.name Only 1 of them works. The other two result in 403 errors (in the same way). In my nginx error log, I…
Ryan
  • 22,332
  • 31
  • 176
  • 357
273
votes
6 answers

Configure nginx with multiple locations with different root folders on subdomain

I'm looking to serve the root url of a subdomain and directory of a subdomain to two different folders on my server. Here is the simple set-up that I have and is not working... server { index index.html index.htm; server_name…
simoes
  • 4,897
  • 4
  • 23
  • 28
1
2 3
99 100