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

2
votes
1answer
2k views

Nginx startup fails ssl no such file or directory

Here is the error I'm getting: Reloading nginx configuration: nginx: [emerg] SSL_CTX_use_certificate_chain_file("/path/to/cert.pem") failed (SSL: error:02001002:system library:fopen:No such ...
2
votes
0answers
201 views

How to debug CGI over fcgiwrap/nginx

I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
2
votes
1answer
410 views

CakePHP and Wordpress on Nginx PHP-FPM

I'm trying to configure both CakePHP and a wordpress blog on the same server. CakePHP here: http://site.com/ Wordpress blog here: http://site.com/blog/ What works: The whole CakePHP app and going ...
2
votes
2answers
845 views

rewrite http to https with ngnix behind load balancer

I'm using a Rackspace load balancer which enables me to set up my ssl key/pem inside of the admin panel. Everything works fine, I can use both http and https protocols. But if I try to redirect http ...
2
votes
2answers
378 views

how to remove location block from $uri in nginx configuration?

I have a rewrite in my ngix conf file that works properly except it seems to include the location block as part of the $uri variable. I only want the path after the location block. My current config ...
2
votes
2answers
991 views

nginx load balancing issue with 301 from backend

I am running into an odd problem for which I am not sure if it is a configuration issue or a bug in nginx. My setup is a nginx reverse proxy which has Apache2 backend servers. The load balancer is ...
2
votes
2answers
2k views

How to tell nginx to serve https only for one vhost-managed domain?

I have an ec2 instance running ubuntu and nginx 0.8.4, with vhosts serving several different domains using http but one using SSL/https. Secure domain configuration: server { listen 443 ssl; ...
2
votes
2answers
740 views

How to insert a delay in response with nginx?

I have a fast-cgi application that do some work at http://myapp.com/do?arg=x. The job may take a few minutes. So I want to keep redirecting the users to the same URL (with 307) until the job is done, ...
2
votes
1answer
535 views

Nginx forwarding requests to the wrong Apache/Plesk Virtual Host

server { listen 81; server_name example.com localhost direct1.example.com www.example.com admin.example.com forum.example.com; location /media/ { root ...
2
votes
1answer
689 views

Custom autoindex pages with nginx

Is there a way to define your own autoindex pages in nginx? I want to add my own HTML and CSS to the generated autoindex pages.
2
votes
3answers
226 views

What is the best method to determine an account through DNS A record configuration?

I apologize if my description of the problem is unclear. I am working for an online CMS that allows external domains to be used similar to Tumblr or Flavors.me. I noticed both of these services simply ...
2
votes
1answer
392 views

Nginx as reverse proxy to Apache with only dynamic content?

It seems to be universally considered good practise to run Nginx as a reverse proxy in front of Apache for serving PHP. Is this still the case when using a CDN to serve all static assets ...
2
votes
3answers
5k views

Nginx + Php5-fpm not rendering php files

I've spent hours figuring out how to install Nginx + Ruby Enterprise Edition + PHP5-fpm and MYSQL, finally it is all installed and all seems to have started fine. But for some reason php files are ...
2
votes
2answers
2k views

nginx & file permissions

I'm running nginx on Debian Lenny. I have many people on the box and they all have "http" directories in their home folders, and I have nginx vhosts configured for those. The problem is: how do I ...
1
vote
1answer
454 views

How to upgrade nginx from 1.2 to 1.6 on debian 7

I've looked through the whole web but couldn't find anything ! I modified sources.list but the server is tuck to nginx 1.2 , I don't know what to do please help
1
vote
2answers
430 views

PHP App (Owncloud) Pages Requesting Incorrect Path for Assets

I have a VPS set up with php-fpm and nginx (with ssl). I have set up Tiny Tiny RSS already, and it works just fine. However, I recently attempted to set up Owncloud, and instantly hit a roadblock. I ...
1
vote
1answer
194 views

Cache Busting and Include Files for Nginx

In Apache you can use the following to cache bust css and js files and server them as a single file with Apache's Include mod: <FilesMatch "\.combined\.js$"> Options +Includes ...
1
vote
1answer
276 views

How to add nginx file upload module to Debian Squeeze?

I need to use nginx upload module in my Debian Squeeze server. I already have installed nginx and nginx-extras. the nginx version is 1.4.2. From the package description of nginx-extras, it seems that ...
1
vote
1answer
852 views

Nginx: expires header not working

I'm having issues with the expires header field. The following nginx rules give me this header (no expire header). Ideas why the expires headers arn't being passed? Header for: /css/v1/afile.css ...
1
vote
2answers
264 views

Globally setting ipv6only=off

Since an update my nginx server is only available via IPv6 and not IPv4 while my config contained listen [::]:80 default_server; Now I've changed this to listen [::]:80 default_server ...
1
vote
1answer
719 views

nginx + fcgiwrap: how come order of fastcgi_param matters?

I'm running Debian 6.0.3 (squeeze), nginx-0.7.67, fcgiwrap-1.0-1+squeeze1. Here is the test script: #!/usr/bin/perl use 5.010; use warnings; use strict; use Data::Dumper; print "Content-Type: ...
1
vote
1answer
422 views

Nginx - Redirect request by GET parameters pattern

One of my servers was attacked by DDoS a couple of days ago and it lasted for 4 days. Below are the logs snippet of the request: 36.224.180.253 - - [14/May/2013:03:11:46 +0800] "GET ...
1
vote
0answers
127 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
1answer
255 views

How to setup CodeIgniter with nginx allowing for SSL?

My nginx.conf file has: server { listen 80; listen 443; server_name www.mysite.com; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; root ...
1
vote
1answer
3k views

gitlab installation: using localhost

I am following this instruction to install gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md All is well until #7. nginx. I have problem with this specific ...
1
vote
1answer
117 views

Nginx and Wordpress permalinks are broken if blog is not in root

So I have installed nginx and Wordpress on my server. However, my blog is not in domain root. (e.g. example.com/blog and contents are in /var/www/example.com/blog) I am using settings below in nginx ...
1
vote
2answers
1k views

FreeBSD Listen Queue Overflows - can't increase max queue size

I have a decently high trafficked FreeBSD Nginx server, and I'm starting to get a large number of listen queue overflows: [root@svr ~]# netstat -sp tcp | fgrep listen 80361931 listen queue overflows ...
1
vote
3answers
1k views

webserver horrible slow, sometimes incredible fast

i am running a small community ( 6000+ Members ) on a non-virtual 64-bit ubuntu 11.04 system. I am not a Linux-pro, not even advanced, i just tried to setup a webserver, which does nothing special ...
1
vote
3answers
4k views

How to output variable in nginx log for debugging

I am testing nginx and want to output variables to the log files. How can I do that and which log file will it go (access or error).
1
vote
1answer
889 views

Wordpress website with extremely slow response (only for the first request)

I've a weird issue with my wordpress website ( http://rohitnair.info/) . The "first request" takes ages to respond. Any subsequent responses behave normally. Things I've observed while debugging ...
1
vote
2answers
392 views

Apache & Nginx on Ubuntu 10.10

I'm running Ubuntu 10.10 with three apache virtual hosts. I just followed this tutorial to set up Rails 3 on Ubuntu using PAssenger and nginx. Everything is running fine except rails/nginx. When I ...
1
vote
1answer
1k views

gzip compression doesn't work in nginx reverse proxy setup

We have nginx in front of an Apache server in reverse proxy mode. We initially had Apache compressing files using mod_deflate, however that proved to cause problems with some instances of Internet ...
1
vote
0answers
5k views

NGINX + php-fpm + APC High CPU Load

I am reaching out for some help here, I have spent quite a few hours on this site searching the posts and also on google trying to see what the issue may be and trying to solve my problem without much ...
1
vote
3answers
186 views

Tell nginx to SSL encrypt specific PHP documents

I have set up my server with the following settings: server { server_name www.example.com listen 443; listen 80; location /login\.php { rewrite ^(.*) ...
1
vote
1answer
644 views

Nginx: verify if nginx if pulling from cache

I use nginx caching to cache html and assets. How can I verify if nginx is actually caching the assets and delivering from the cache?
1
vote
1answer
924 views

Serve different files for specific user agents using nginx

Using nginx, how do you serve different static files for different user agents? For example, if the current user is using an iPhone, they should be served mobile_index.html, whereas all other user ...
1
vote
1answer
580 views

How to configure Plesk to use nginx for sub-domains?

I've tried to setup nginx on my brand new linux-server together with Plesk 10.3 (latest) and created a new nginx subdomain for port 8226 - how can I configure Plesk to use nginx as a server for my ...
1
vote
2answers
638 views

When accessing PHP files, nginx throws an 404 error

Right, sorry for the previous, recent questions I've asked about nginx, this is just doing my head in. I've enabled PHP using fastcgi_php and it works just fine, however, when I access to a PHP file, ...
1
vote
0answers
548 views

nginx does not close loopback connections

I'm using nginx in reverse-proxy mode. Here's relevant part of config file: server { listen 80; server_name ~^web.redhelper\.ru$ ; access_log off; location /http-bind { ...
1
vote
1answer
834 views

How do you run Nginx on port 8080 and Apache on port 80 on the same box?

I want to install Node.js on my box (CentOS 5) for testing and sandboxing but I can't uninstall Apache as recommend by developers using Nginx. So what I'd like to do is have Nginx serving ...
1
vote
1answer
5k views

How to quick and easy remove part of an URL in Nginx with HttpRewriteModule?

I know about the HttpRewriteModule, but I don't really know how to handle regex and I would need to redirect all URLs within a certain directory to another, specifically ...
1
vote
3answers
2k views

How to monitor HTTP response error codes from nginx using munin?

I'm beginning to use Munin to monitor an in-production Nginx server. One thing I'm particularly interested in graphing is the rate of errors--HTTP responses with codes in the 50x range. I'm wondering ...
1
vote
2answers
1k views

PUT to static file in nginx

I am trying to figure out how to allow PUT to a static file in nginx, the put request will be proxied to a php script. An example of the request I am trying to get working using curl is: curl -X PUT ...
1
vote
2answers
2k views

nginx location regex matches directory range

I am trying to set up nginx and I don't get the point how to do the following setup: I have an URL http://somehost.com/foo/bar/123/xxx_xxx that needs to be passed to different backends depending on a ...
1
vote
3answers
1k views

Nginx & Https Redirection

I have an ssl certificate for www.domain.com. Obviously if someone goes to https: //domain.com, they will get an error from the browser about a certificate mismatch. Is it possible to setup the ...
1
vote
1answer
160 views

Proxying to the same server on multiple ports?

I'm busy configuring an nginx reverse proxy that resides on one server, which will sit in front of one (for now) apache webserver on a different server, which will be serving a Django appplication via ...
1
vote
4answers
2k views

Nginx + uWSGI on a fresh Ubuntu install - bind error port 80

I know this is a common problem usually having to do with apache or another service already running on port 80 and I have done a lot of searching and running netstat and still have not figured out why ...
1
vote
2answers
674 views

nginx caching dynamic content to static

I've read and heard that nginx can cache dynamic content and make it static so it loads faster taking more of a load of apache. has anyone done this before? is it worth it? any pros/cons to it?
1
vote
2answers
237 views

Is the # of CPUs on a virtual machine always meaningful?

On a virtual machine, if cat /proc/cpuinfo tells me that there are 4 CPUs, is this just as meaningful as if it were bare metal? Should I configure my server (for example, # of Nginx or Apache workers) ...
1
vote
2answers
236 views

Block an IP-address which tries to download entire website

I need to block an IP-address which tries to download my entire website. Currently I've blocked it using iptables. Is there any way to block an IP automatically if it's trying to request to many ...