Nginx ("engine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

learn more… | top users | synonyms

0
votes
2answers
584 views

configuring sendmail sender address

Just finished installing sendmail and was able to successfully send an email from the command line. However, the sender address was from root@EquinoX. I want to be able to change this so that the ...
1
vote
3answers
919 views

Phusion Passenger Installation Not Working

I've been trying without success to install the Nginx version of Phusion Passenger (mod_rails) on my server by using the command gem install passenger followed by passenger-install-nginx-module. ...
3
votes
4answers
3k views

How to add a pool to FPM (nginx) without reload/restart fpm itself?

Im building an environment (on a ubuntu 10.04.02 machine) to handle a website with many (should support at least 1000) subdomains, each of them served by a different FPM pool, with a different user. ...
2
votes
1answer
766 views

nginx rewrite on specific files

I have a small issue with redirecting two files from location A to location B using nginx. Those files were in a folder folderA and now I want them to be served from folderB. Unfortunately some users ...
4
votes
2answers
8k views

Nginx returning blank HTML pages with php-fpm

I'm using php-fpm through Nginx. My nginx.conf can be found here: http://pastebin.com/Nu9iD8Km It includes a file found here: http://pastebin.com/ece4cwXF My php-fpm.conf can be found here (all the ...
12
votes
4answers
1k views

What does Nginx lack that Apache has?

Nginx is said to be much more resource-efficient and easier to configure than Apache. A friend told me that "it can't do some things that Apache can do, but I don't need those things anyway." Still, ...
0
votes
1answer
1k views

Rails 3 passenger nginx application spawner server error on Synology NAS

Question updated, please read UPD2. I'm trying to deploy app through passenger nginx module on DS710+ (ruby 1.9.2p0 installed). There is syntax error relative to ...
0
votes
2answers
3k views

Passing arbitrary http request headers to nginx and then to php

I have this web service that's running on nginx and fastcgi(php-fpm). The web service is used by some embeded http clients which will need to send some arbitrary http request headers when they are ...
1
vote
2answers
795 views

update nginx status code

I want nginx to handle 404 error status and redirect them to another domain. In headers "Location:" is updated but status is still 404 but should be 301. Here is my code : # error handling ...
10
votes
5answers
5k views

Remove “www” and redirect to “https” with nginx

I want to create a rule in nginx that does two things: Removes the "www." from the request URI Redirects to "https" if the request URI is "http" There are plenty of examples of how to do each of ...
0
votes
1answer
548 views

nginx passing non-standard http request header to php

I'm using nginx as the web server and php-fpm as the app server. Now I'd like to pass one or more request headers such as FROM_CLIENT : client1, what is the correct way to do it thanks.
0
votes
1answer
425 views

How to interpret these munin stats of nginx?

The following stats are from a site where nginx was placed in front of a webserver to deliver static files and let the CMS application on the legacy webserver focus on the dynamic work. This is done ...
1
vote
3answers
2k 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 ...
0
votes
1answer
290 views

what's the best webserver configuration for this setup?

I have a webserver running on an IBM blade, hardware configuration is: Intel Xeon E5506 x 2 (8 cores) 12G mem SAS disk raid1 I use this box as a dedicated webserver serving a dozen of simple php ...
3
votes
1answer
3k views

Can't get nginx caching to work

I have mostly simple nginx configuration. I can't get caching to work http { ... server_tokens off; proxy_hide_header X-Powered-By; fastcgi_hide_header ...
0
votes
1answer
892 views

How to use basic auth on a directory in nginx? not as easy as it seems

I have a site with a structure like this: www.example.org - if you got to / you get a wordpress CMS www.example.org/wiki - a mediawiki www.example.org/project - projectpier I'd like ...
0
votes
1answer
100 views

Setting nginx as a reverse proxy help

I'm a bit new to reversing caching proxy.. Just wanting to setup a on my ssl requests, The secure.mydomain mainly deliverys txt and gz static small (less than 200k) files. Any help would be greatly ...
1
vote
1answer
446 views

Alias wordpress folder from within another website

I have a little dilemma. I wrote a custom PHP MVC framework and built a CMS on top of it. I decided to give nginx+fpm a whirl too. Which is the root of my dilemma. I was asked to incorporate a ...
0
votes
2answers
1k views

Nginx - shorter “expires” for args match

I am using rewrite like this if (!-e $request_filename) { rewrite ^/(en|ga)?/?(.*)$ /index2.php?cultureKey=$1&mq=$2 last; } but after I need certain rewritten URLs to be ...
1
vote
2answers
4k views

Nginx as a reverse proxy to a Tomcat instance via the HTTP connector

I'm dropping Apache as a reverse proxy to a Tomcat instance, mainly because it has no other purpose other than forwarding requests to the Tomcat instance. I'm no expert at deploying Java Web ...
0
votes
1answer
2k views

How to correctly use the NginX location directive?

I am attempting to use the phpmyadmin package installed via apt on Ubuntu 10.10 with NginX and although I eventually got it to work, I don't think I'm doing it correctly: server { listen 80; ## ...
2
votes
2answers
6k views

How to configure multiple root for nginx?

location ~ { root /var/www/static1/; root /var/www/static2/; } I tried the above,so that when /name.gif is requested ,if /var/www/static1/name.gif exists, then just ...
1
vote
2answers
527 views

Nginx trailing slash rewrite not working

I have a site that uses subdirectories and currently only works when the trailing slash is added to the URL ("http://www.domain.com/dir/"). When there is no trailing slash, I get "unable to connect at ...
3
votes
1answer
1k views

Nginx/PHP-FPM long log lines get truncated

I am unsure is that is a Nginx or PHP-FPM setting, but long log lines are getting truncated. Is there a setting to increase the max log line length?
0
votes
1answer
472 views

How to create an efficient download statistics of files hosted with nginx

My problem I have a debian squeeze installation running nginx as my webserver and handling PHP5 requests using php-fpm, which works fine. I have one directory, which holds static zip files of a ...
2
votes
1answer
3k views

Getting correct SERVER_PORT to php-fpm through nginx and varnish

The goal is to get PHP aware of the correct web-facing server_port. The setup is: nginx on port 443 reverse proxying to varnish on port 80 reverse proxying to nginx on port 8008 and running php-fpm ...
4
votes
1answer
3k views

How to use fail2ban to parse Nginx access log to count 404's and ban ip addresses?

How can I use fail2ban to parse Nginx access log to count 404's and 502's, and ban ip addresses with too many requests?
1
vote
1answer
791 views

Lightest IP geolocation technology for static site?

I run a site that is behind a Squid reverse proxy which delivers most of the content cached (including html, not only images, etc.). I need to show a different content for our users located in the US. ...
2
votes
2answers
195 views

Apache limit users per month to certain vhost

Is there a way in apache to limit the amount of users that can view a site in a certain month? I'd need to do this for individual vhosts. Something along the lines of: <VirtualHost *:80> ...
1
vote
1answer
254 views

how to get list of http request currently getting handled by nginx server?

i am using ab command to hit the http request to my local host . now on server side i want to check how many request currently getting handled by my nginx server. like in case of DB we can check ...
-1
votes
1answer
225 views

NGINX with PHP?

I just install nginx manual on ubuntu. And how i can include php?
3
votes
3answers
6k views

nginx Block IP based on URI in one 'location'

There is currently a block of one location / location / { root /var/www/docs; proxy_pass http://backend; proxy_buffering on; proxy_buffer_size 64k; proxy_buffers ...
1
vote
1answer
915 views

Nginx making request to /ping every second?

I'm having this problem where when I start up nginx it starts sending/receiving traffic at a rate of 1 GET request every second from nginx on port 80 to /ping, but I can't track down what is causing ...
2
votes
1answer
5k views

How to combine url rewriting and fastcgi in nginx?

I have trouble to set up a combination of url rewriting and fastcgi for nginx. The application server behind the fastcgi interface expects /myapp/ as base path. And I want to make this accessible ...
2
votes
1answer
2k views

optimize nginx for large file downloading

Hey, I'm wondering what are some general options I should look into for optimizing an nginx server for large file downloading (typically 100mb to 6gb). I just migrated from lighttpd and I'm noticing ...
1
vote
1answer
419 views

nginx redirect domain to www.domain (ssh)

Greetings everyone! I have a weird issue with nginx. I want to redirect all traffic that comes from domain.com to www.domain.com. I also want to redirect the secure one: https:// domain.com to ...
0
votes
1answer
126 views

Nginx thinks php-fcgi process is dead, but script ran anyway

Ok this is bit of a weird title, but the problem is weird, too. We have a two server setup (www01 and www02) both running nginx and php as php-fcgi. Nginx is configured to redirect the request to ...
0
votes
1answer
343 views

make everything go to https except for one url in rails, nginx, passenger

Hey, I have a rails app and I am already redirecting nearly all traffic to use https. However, there is a particular path in my app which I need accessible by plain http, say somedomain.com/special. ...
1
vote
2answers
1k views

nginx reverse proxy cache with gzip content and non-gzip content

I'm developing a rails web services with ngnix + passenger, and I use reverse proxy cache in nginx. It works quite well and very fast. The problem is that some clients don't support gzip while some ...
1
vote
2answers
592 views

nginx using up ip_conntrack a lot faster than squid .. why?

I'm working on scaling up a front-end proxy server, and up until yesterday I was using Squid as the reverse-proxy (even though basically nothing was being cached, i.e. Squid was proxying only). Today ...
4
votes
1answer
6k views

How to configure nginx+php (fcgi) to run every subdomain with a different user?

Im pretty new to nginx and - more for learning purpose - im trying to configure Nginx in order to run php with a different user for every subdomains. For example, i would like to use user john for ...
0
votes
2answers
1k views

Clean Nginx config: one Rails app, multiple domains, redirect to non-www domain

I am hosting a Rails app on Nginx that is accessible through a defined set of domains. For each of these domains I also want to forward www to non-www. Right now my config file looks like this: ...
19
votes
4answers
17k views

What is the best nginx compression gzip level?

I'm using nginx reverse proxy cache with gzip enabled. However, I got some problems from Android applications HTTP-requests to my Rails JSON web service. It seems when I turn off reverse proxy cache, ...
6
votes
3answers
5k views

Mapping hudson to a subdomain through nginx proxying

I'm now trying to setup nginx as a reverse proxy for Hudson so it can be access on http://build.example.com directly. I've already installed Hudson on Tomcat and verified that I can access Hudson on ...
1
vote
1answer
526 views

Using UNIX sockets with nginx

I would like to clarify some doubts I have about using nginx to proxy requests over a cluster of thin servers (http://code.macournoyer.com/thin/). I've read many blog posts about using UNIX sockets ...
0
votes
4answers
5k views

NGINX Remove index.php /index.php/something/more/ to /something/more

I'm trying to clean urls in NGINX using framework DooPHP. This => - http://example.com/index.php/something/more/ To This => - http://example.com/something/more/ I want to remove (clean url) the ...
6
votes
4answers
22k views

How to set up a fallback error page in nginx?

I'm configuring nginx's handling of some error pages and other "default" media files (such as favicon.ico and robots.txt) at the moment and I ran into a minor problem getting things to work the way I ...
1
vote
1answer
168 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 ...
0
votes
1answer
462 views

Free tool to gather daily per-url stats from nginx access log

I need to analyze nginx access logs, and come up with stats in this format (or equivalent): DD-MM-YYYY /url hits-total hits-unique Where unique hits are determined per-ip. All log analysis ...
6
votes
3answers
3k views

Can I use the same SSL certificate for smtp, imap, pop3 and http?

So far I'm using self-signed certificates, but decided to at least consider getting the "real" one. So far I noticed that internal formats of the certificated are a bit different, that is: http ...