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
1 answer

Very low requests/second with fresh NGINX install

With a fresh install of nginx, I obtain these results running apache benchmark, which I feel are very very odd. The page fetched is the default static index.html test page installed by nginx. Running ab locally has very high requests/per second, but…
5
votes
4 answers

Choosing web server software for security

Nginx, an open source web server that's relatively new on the market, has been attracting some interest lately, having performed really well in some benchmarks over the past years. In choosing server software for publicly accessible business…
user11415
5
votes
2 answers

Regular expression from the hostname in the proxy_pass uri in Nginx

I want to do something like: server_name ~^(www\.)?(?[^.]+).example.org$; location / { proxy_pass "http://example.org:8080/$subdomain"; }
jpiasetz
  • 205
  • 1
  • 4
  • 8
5
votes
3 answers

Setting up phpmyadmin, got a MySQL syntax error

I tried installing phpmyadmin on Debian Squeeze with a nginx and mysql-server installed. I ran sudo apt-get install phpmyadmin, and all appeared to be going well until setup threw me this: An error occurred while installing the database: mysql…
jibcage
  • 81
  • 2
  • 5
5
votes
3 answers

Redirect http://example.com:12345 to https://example.com:12345 in nginx

I know this must have been answered already, but I have been searching for quite a while, and cannot find the answer. Just not looking in the right place I guess, maybe someone can help me out. Basically I am running phpmyadmin through SSL on a…
Saif Bechan
  • 10,960
  • 10
  • 42
  • 63
5
votes
3 answers

Ubuntu + Nginx 127.0.0.1 works but localhost doesn't

this one is weird, because I don't have any error messages. I have a very basic default file: server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 root…
valk
  • 497
  • 2
  • 9
  • 20
5
votes
1 answer

Does nginx auth_basic work over HTTPS?

I've been trying to setup a password protected directory in a SSL website as follows: /etc/nginx/sites-available/default server { listen 443: ssl on; ssl_certificate /usr/certs/server.crt; ssl_certificate_key /usr/certs/server.key; …
monde_
  • 51
  • 1
  • 2
5
votes
3 answers

Howto Nginx + git-http-backend + fcgiwrap (Debian Squeeze)

I am trying to setup git-http-backend with Nginx but after 24 hours wasting time and reading everything I could I think this config should work but doesn't. server { listen 80; server_name mydevserver; access_log…
brainsqueezer
  • 81
  • 1
  • 5
5
votes
1 answer

see all active virtual hosts in nginx?

In apache2, I can see all the active virtual hosts by doing apache2ctl -S. This is useful since I don't need to plough through the config files, and also if I have made changes to the config files and not yet restarted apache2. Is there an…
bobinabottle
  • 579
  • 2
  • 7
  • 19
5
votes
1 answer

Is this good practice for making subdomains

I'm trying to create subdomains with my web application, however, I'm not experienced in nginx that much, I've been trying to find a stable solution from SF, but unfortunately I can't find any good solution. The problem I'm trying to do is create…
Lewis
  • 51
  • 1
  • 3
5
votes
1 answer

Using ab to benchmark nginx: Connection reset by peer (54)

I recently updated to nginx 1.0.8 and tried to benchmark performance for cached dynamic pages (initially served by a Django app via proxy_pass) and for static pages. In both cases, nginx will not serve more than 3 or 4 requests (even without…
janeden
  • 237
  • 2
  • 6
5
votes
1 answer

Analyze uwsgi strace log to find out why it takes high CPU usage

I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab simulate heavy concurrent traffic. Here is one strace…
chenxee
  • 151
  • 1
  • 4
5
votes
1 answer

NGINX: how to block access to all files inside some directories

I have different files inside three different directories. I'd like to block access to all files inside those (also block directory listing). This way, I'd block, for example: /a/b/file /a/c/file /a/d/file Whatever the file extension... This is…
Roger
  • 473
  • 11
  • 22
5
votes
3 answers

How do you set up SSL and Nginx Proxying?

I have Nginx listening to traffic on port 80 and proxying certain request to Apache over port 8080. I am going to set up Nginx to listen to port 443 for https traffic, but my question is how should the proxying be done now? Does the proxy to Apache…
Jason Christa
  • 622
  • 4
  • 11
  • 21
5
votes
1 answer

Nginx reverse proxy: Not setting expires header

I have my static assets configured as location @upstream { proxy_pass http://localhost:82; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For …
Quintin Par
  • 4,373
  • 11
  • 49
  • 72