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

How to enable the rewrite feature in nginx 1.0.5?

I recently installed nginx 1.0.5 with php fpm, php apc and postgres. I just want to play around with nginx and learn how to configure the basic stuff. For extended testing I decided to install PHPBB3 (went well) to see if PHP + Postgres access…
PythonLearner
  • 1,032
  • 2
  • 12
  • 31
5
votes
2 answers

Nginx redirect loop when using proxy_pass over SSL

We are using Nginx as a load balancer for our Rails app. Since we're are moving to a multicloud hosting solution, we want our load balancer to start using SSL for every connection when it's forwarding requests to frontends, since some of them might…
smathieu
  • 141
  • 2
  • 6
5
votes
2 answers

Strange request in access.log, how to block?

I am using nginx on my own server, and I noticed a few days ago some strange request in my access.log : 77.50.217.37 - - [19/Aug/2011:17:50:50 +0200] "GET http://images.google.com/ HTTP/1.1" 200 151 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT…
jchampem
  • 53
  • 1
  • 3
5
votes
5 answers

Which Is a Good Starting Point For Beginner? Apache, Nginx or Cherokee?

Any of these web server software i.e., Apache, Nginx and Cherokee is suitable for my website at the moment. And I am learning sysadmin to be able to manage my server (and not for a job). For a beginner that I am, any web server is equally new. So,…
user88753
5
votes
2 answers

Nginx + PHP-FPM Timeouts, almost zero load consumption?

I've got a server running on a Linode with Ubuntu 10.04 LTS, Nginx 0.7.65, MySQL 5.1.41 and PHP 5.3.2 with PHP-FPM. There is a WordPress blog on it, updated to WordPress 3.2.1 recently. I have made no changes to the server (except updating…
javipas
  • 1,332
  • 3
  • 23
  • 38
5
votes
1 answer

nginx rewrite rule for using domain host to redirect to specific internal directory

I'm new to Nginx rewrites and looking for help in getting a working and minimal rewrite code. We would like to use urls like 'somecity.domain.com' on campaign materials and have the result go to city-specific content within the 'www' site. So, here…
user85836
  • 51
  • 1
  • 1
  • 2
5
votes
2 answers

Recompile NGINX with "--with-http_stub_status_module" configure line

I've installed NGINX with sudo apt-get install nginx and now I'd like to recompile it with the configure option --with-http_stub_status_module. How can I do this, and is there a way I can not loose all of my /etc/nginx configuration? Thanks! Tom.
tarnfeld
  • 471
  • 2
  • 7
  • 13
5
votes
3 answers

NGINX Pass-through server header

How do I get NGINX to pass through the 'server' header of upstream servers? Like, if NGINX is proxying to an Apache server with the Server header 'Apache2.2 (CentOS)', it strips it out and replaces it with 'NGINX/1.0.1'. We have our machine ID's in…
user80776
5
votes
1 answer

nginx+ uwsgi gives 502 Bad Gateway

I used this guide to set it up and it was working to server my django app for a while, but after adding a new django module, without touching any of the nginx or uwsgi configs, now the server leads to 502 502 Bad Gateway error. The nginx error.log …
alfish
  • 3,127
  • 15
  • 47
  • 71
5
votes
1 answer

Set max_fails and fail_timeout for all servers in upstream in nginx

All of the examples I've seen of using upstream (for load balancing) in nginx look like this: upstream backend { server backend1.example.com:8080 max_fails=3 fail_timeout=30s; server backend2.example.com:8080 max_fails=3…
John Smith
  • 75
  • 1
  • 2
  • 5
5
votes
3 answers

nginx: redirect subfolder to subdomain

I'm trying to redirect a subfolder to a subdomain in nginx. I want http://example.com/~meow/ to be redirected to http://meow.example.com/. I tried the following: location ~ ^/\~meow/(.*)$ { rewrite ^(.*)$ http://meow.example.com$1…
mrm8
  • 65
  • 2
  • 4
5
votes
3 answers

Why is the response truncated at 16k with php + fastcgi?

I've got PHP 5.3.3 and nginx 0.8.47 compiled from source running a Wordpress blog. The RSS feed generated by Wordpress was getting truncated at roughly 16k (including header was 16k+90b). By adding the following to my nginx config: fastcgi_buffers 8…
ColinM
  • 701
  • 8
  • 19
5
votes
2 answers

NGINX Redirect Rule: Subfolder only to HTTPS?

I'm trying to redirect anyone who access the admin section of my site to the HTTPS version of it. The current rewrite rule is as follows: server { listen 80; server_name domain.com; location / { …
Professor Frink
  • 529
  • 4
  • 7
  • 15
5
votes
2 answers

Nginx Multiple Domains

I am trying to add a second virtual host to nginx. When i go to the new domain it redirects to the old one. I have tried restarting Nginx, rebooting the server. Has anyone come across this before, care to share? File: nginx.conf ### user…
showFocus
  • 161
  • 1
  • 4
5
votes
1 answer

How to set up a private CDN using nginx?

Here is the problem: I have a Linux server in Europe serving a busy Drupal site using nginx+php-fpm, I have another Linux server in the US (where a big portion of my visitors are coming from). The second server is heavily under-used. I am wondering…
alfish
  • 3,127
  • 15
  • 47
  • 71
1 2 3
99
100