nginx (pronounced "engine-x") is a lightweight, high-performance Web server and reverse proxy as well as IMAP/POP3 proxy server.

learn more… | top users | synonyms

1
vote
0answers
93 views

Handling multiple server blocks in nginx configuration

I am working on setting up a proxy server for my application.The use case is I want a specific set of requests to be redirect to say abc.com and rest of the request to be redirected to xyz.com. Eg:If ...
1
vote
0answers
207 views

Force chunked transfers when using gzip static on / sendfile in Nginx?

Nginx seems to disable chunking when sending files that are pre-compressed ala gzip_static on Is there any trick to force it to chunk anyway? Chunks seems to give some browsers the illusion of faster ...
1
vote
0answers
52 views

Two urls directed to same file

I need two urls to point to the same php file using nginx. How do I do this? example: api.example.com/users => /var/www/public_html/index.php/users example.com/api/users => ...
1
vote
0answers
185 views

Nginx compiled with couchbase-nginx-module high CPU usage

I'm testing couchbase_nginx module with ngx_srcache module to store data in couchbase. I use https://github.com/couchbaselabs/couchbase-nginx-module to compile and installed the setup according to the ...
1
vote
0answers
46 views

Redirect subfolder to subfolder and remove subfolder via nginx

I'm trying to redirect a subfolder to another subfolder with nginx. The hard part is removing the target subfolder from displaying, as it's a ruby app and not a true root folder. They are both on the ...
1
vote
0answers
135 views

Gitlab front-end public “chrooted”

i have 2 servers : first : contain gitlab + apache proxy , on my internal network domain git.development second : server front-end only nginx, on my public domain git.mydomain.com i want ...
1
vote
0answers
352 views

Getting nginx proxy to work properly with gunicorn/flask

I got this Flask app that I'm running with gunicorn on 127.0.0.1:5002 on this shared server. I got a nginx instance for myself that I can add custom configs to. The structure of the nginx directory is ...
1
vote
0answers
222 views

request hangs if made over domain

I have an app where a user can login using github. When I log in, the app hangs for about one minute. This is the log Started GET "/" for 177.97.171.165 at 2013-08-11 15:26:01 +0000 Started GET ...
1
vote
0answers
490 views

Nginx not reponding

I have setup WNMP on Windows Server 2012 despite the fact that it's not that great of a setup it's required, here are my settings: worker_processes 1; error_log logs/error.log; #pid ...
1
vote
0answers
107 views

I can't restrict access to directory and subdirs in nginx

Could you help me with my nginx config file? The problem: I can't restrict access to directory, only to one file. This line working: location ^~ /wp-admin/index.php { (But only for one file) ...
1
vote
0answers
333 views

Most efficient way to pipe web beacon logs to Apache Flume?

The Setup I've setup a simple Nginx server that logs (in a JSON) format, which is then piped to an S3 bucket with Apache Flume. All the Nginx server does is respond with a web beacon tracking pixel ...
1
vote
0answers
63 views

Nginx client certificate using IP

Following is my server block. I am using client certificate for controlling access to the webservice. Everything works fine if I access the service as https://domain.com/TEST. But if I try to access ...
1
vote
0answers
80 views

Nginx blocking webstes with proxy_pass

I have an Nginx script that proxied HTTP request using this: proxy_pass http://$http_host$uri$is_args$args; I have a list of websites and I want to make it just these ones accessbile by the proxy. ...
1
vote
0answers
180 views

Nginx fastcgi cache configuration

Here's the cache path configuration inside http{} fastcgi_cache_methods GET HEAD; fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=website:10m inactive=1d max_size=10m; Here's the config ...
1
vote
0answers
106 views

Deploying sinatra app on rails app sub uri using( unicorn and nginx)

I have rails app running on unicorn+nginx. below is the nginx.conf and unicorn.rb configuration. nginx.conf upstream unicorn { server unix:/tmp/unicorn.todo.sock fail_timeout=0; } server{ ...
1
vote
0answers
288 views

Nginx + php5-fpm + CodeIgniter Response Too Slow

I have installed nginx, php5-fpm and setup codeigniter with REST controller on Ubuntu 12.04 LTS. The configurations work but response is too slow at times, even with just a single user. Sometimes the ...
1
vote
0answers
178 views

How to block trafic from anonymous proxy to my site?

some scammers are trying to reach my site using anonymous proxy. Is there a way to block connexions from anonymous proxy with haproxy or nginx? Thanks
1
vote
0answers
184 views

Prevent Google Image Search hotlink with Nginx rewrite

Google Image Search have the ability to point to the original image without displaying the website that's hosting the image. So I want to redirect those requests to a custom page of my site. ...
1
vote
0answers
250 views

Configuring Nginx reverse proxy with SSL and websocket

I'm running a web app that is using websockets and have nginx as a reverse proxy for that and that works fine. I've also been able to get SSL to work without the socket. Now we're nearing the official ...
1
vote
0answers
105 views

Nginx doesn't rebound from 502 Bad Gateway

We have a situation where a site starts to serve a 502 Bad Gateway but doesn't seem to recover after the upstream servers rebound. The nginx server is setup to proxy/load balance requests for two ...
1
vote
0answers
38 views

Prevent NGINX from rerouting to a backend that was previously down

I'm using NGINX's ip_hash directive to ensure that client requests always end up at the same backend server. In the case of a backend server outage, NGINX will reroute to the available server, and ...
1
vote
0answers
124 views

Nginx Installed w/Passenger but No Command Line

I installed Passenger and Nginx on Ubuntu 12.10 using the following command: passenger-install-nginx-module (following instructions at www.modrails.com/documentation/Users guide Nginx.html). When I ...
1
vote
0answers
63 views

NGINX Benchmark

I had set up nginx, php-fpm and mysql as web server. Now I am testing the server that I've configured using ab (Apache Benchmark) I use this command : ab -kc 100 -n 100 http://myserver/index.php but ...
1
vote
0answers
66 views

Is it possible to dynamically set the upload_store value for nginx upload modue?

I have a lot of hard drives in my server and I want to upload files to them. Since it is overhead to upload a file to one drive and then move it to another, I would like to directly upload the file to ...
1
vote
0answers
225 views

PHP SSI with NGINX

I've got a really old website I'd like try running on NGINX instead of Apache. This site consists of many flat HTML files with sporadic PHP SSIs, such as: <!--#include virtual="/some_file.php" ...
1
vote
0answers
166 views

How can I serve up HTML and JSON with nginx during “maintenance mode”?

I've got an nginx config for a PHP web app and I would like to make it serve an additional purpose, and I can't seem to find a way to accomplish it. My current nginx config does the following: ...
1
vote
0answers
167 views

Fail with ab test with nginx, two workers and 1024 connections?

I'm doing some tests with nginx 1.4.1 and Node.js 0.10.5 on my development machine (P8700 Dual Core 2.53Ghz, 4Gb RAM running Xubuntu x64). Unfortunately I can't do ab with 100000 requests with a ...
1
vote
0answers
81 views

Time-based quota for serving files via Nginx

Is there a way to make nginx stop serving files after some amount of traffic has happened in a given period of time? Something like - if the server served more than 1G in the last day, stop serving. ...
1
vote
0answers
63 views

proxy_pass requests only if the requested file exists

Is there a way to proxy_pass requests to an application server only if the requested file exists? There is the if (!-f $request_filename) way, but it is strongly recommended against by the nginx ...
1
vote
0answers
296 views

Nginx reverse proxying Drupal content served with Apache

I'm new to Nginx but was interested in trying it out. I now have Nginx listening to port 80 and serving static html content from /srv/www for a main "promo site". I've also set up apache2 to the ...
1
vote
0answers
41 views

How do I make nginx rewrite requests to a different server (which is in the same config)?

I am trying to achieve the following: Some files on my server should be served from a subdomain (static.example.com) for performance purposes (avoiding cookies). However, some of the content is ...
1
vote
0answers
794 views

Why does nginx not send the Content-Length header when the request is HEAD?

I am using CURL to test HEAD requests to my nginx server. The file being served is a simple PHP file. If I use GET: $ curl -XGET http://test.com/phpinfo.php -I HTTP/1.1 200 OK Date: Tue, 09 Apr 2013 ...
1
vote
0answers
308 views

NGINX and CGit configuration

I?m trying to setup CGit and NGINX. I'm almost there but I have a problem with the rewrite rule in my NGINX's conf file. Currently I have this: server { listen 80; server_name ...
1
vote
0answers
326 views

NGINX and OpenStack Horizon?

I recently update our web infrastructure to use NGINX instead of our Apache servers. Now, I'm also operating an OpenStack Infrastructure and I was wondering if there is a state of the art way to ...
1
vote
0answers
102 views

nginx: how to serve files in gzip format when client accepts “Accept-Encoding: gzip” and inflated otherwise?

I have a folder full of .gz files and would like to serve them transparently inflated if requested by a client that does not send Accept-Encoding: gzip in the request and as-is (gzip'd) otherwise. I ...
1
vote
0answers
744 views

Using SAML authentication within nginx

I want to restrict access to some static content, served using nginx, using an existing SAML 2.0 IdP. (In Apache, this would be done with a module such as mod_mellon or mod_auth_saml) What is the ...
1
vote
0answers
107 views

mediawiki and wordpress MU different root with Nginx

i want to use wordpress MU with mediawiki on the same domain , but i'm using a kind of mediawiki hosting service called wikifamily. so i have to different script root : /var/www/wikifamly for ...
1
vote
0answers
188 views

YSlow - Giving Fs for Expire and Compression, but response headers appear correct

I just moved a moderately busy wordpress site from shared hosting to a VPS server with 512MB ram and attempting to performance tune before I break down and buy another VPS to lighten the load. As such ...
1
vote
0answers
243 views

Issue serving static contents securely via nginx X-Accel and rails send_file

I am trying to serve static contents via nginx & rails using X-Accel-Redirect. My actual static content directort located at rails root folder like this rails_root\books. This is my nginx config ...
1
vote
0answers
200 views

ISPconfig Bind9 Nginx CNAME error

I have a Ubuntu 12.04 server with Bind9 and Nginx. I have done many years of web development, and usually used Apache2. I just migrated from a Apache2 server to the new larger one running Nginx. All ...
1
vote
0answers
202 views

Nginx reverse proxy apache2 High CPU load

my server: 2x Intel Xeon 5506 2.13GHz 24 GB DDR3 RAM Debian 5.0.8 64-bit My server CPU is aroung 90% at 600 users and around 6 page views per second. There are 2 Sites on the server. One Forum with ...
1
vote
0answers
411 views

NGinx - PHP / CGI - No input file specified

I know this is a common problem. I googled and tried a lot but still doesn't work. "No input file specified" while calling PHP files from browser. I Installed nginx php/cgi on a fresh debian machine. ...
1
vote
0answers
362 views

nginx proxy_pass to different backends based on location / passing rewrited url

What the quickest and cleanest solution if you want to proxy URL request to two different backends via proxypass based on location. location /app1/ { alias /var/www/ruby/public; ...
1
vote
0answers
350 views

Nginx > Varnish > Gunicorn Error Too many Redirections

I have the following config: Nginx > Varnish > Gunicorn > Django I want to cache 2 versions of same site (mobile & web) with Varnish. Gunicorn : WEB: gunicorn_django --bind 127.0.0.1:8181 ...
1
vote
0answers
457 views

Nginx config rewrite or internal redirection cycle

I'm using Nginx with ISPConfig 3 to make the configuration and I'm getting rewrite or internal redirection cycle that I can't figure out with my limited knowledge of nginx. [error] 13741#0: *64 ...
1
vote
0answers
291 views

Nginx, wordpress: Unable to proper reverse proxy caching due to Set-Cookie. Recommendation for a good strategy

I am trying to do reverse proxy caching for a wordpress blog and I am hit with snags. The initial configuration was a simple reverse caching like this location / { proxy_cache_key ...
1
vote
0answers
277 views

Stress testing Django app - how to improve throughput?

I'm having my first attempt at stress testing a simple django web app running from gunicorn and nginx which I’ve put on a small 256MB Rackspace Cloud server. Using httperf, I increase the number of ...
1
vote
0answers
853 views

Nginx Active/Active Cluster Setup

I am currently attempting to configure a pair of load balancing servers in an Active/Active configuration using the following: Nginx Corosync Pacemaker Applicable instructions were followed ...
1
vote
0answers
56 views

apache - backend and nginx - frontend fixing

I'm using apache as a backend server and nginx as an front end server, and i've got stuck with configurations. Here a my nginx.conf file and here are my apache2.conf I was doing that some time ago, ...
1
vote
0answers
93 views

Domain root on nginx not working

mydomain.com is running with nginx1.2, php-fpm, apc on an ubuntu server (medium - amazon ec2). I have been tweaking my server for past 6 months, however a problem started occurring since day before ...