nginx (pronounced “engine-x”) is a lightweight, high-performance Web server/reverse proxy and e-mail (IMAP/POP3) proxy, licensed under a BSD-like license.

learn more… | top users | synonyms

12
votes
5answers
512 views

Is it worth looking into a webserver other than apache?

I've traditionally deployed my sites under apache, simply by default. I've heard things about NGinX though and I'm wondering under which conditions it would be superior. In addition to apache and ...
8
votes
2answers
24k views

Can I skip the PEM pass phrase question when I restart the webserver?

After buying a multi-domain SSL certificate I have started testing it with the Nginx webserver (following documentation in their SSL wiki page). Everything is fine, it works and I get a green ...
7
votes
2answers
2k views

Why there suddenly were so many 400 request in my access log?

Below are little part of my access_log 118.186.8.50 - - [19/Dec/2011:22:42:57 +0800] "-" 400 0 "-" "-" 05 118.186.8.50 - - [19/Dec/2011:22:42:57 +0800] "-" 400 0 "-" "-" 06 118.186.8.50 - - ...
4
votes
1answer
86 views

How can I serve all resources under HTTPS instead of HTTP without changing their URLs in the HTML code

I know that by using an .htaccess file I can redirect everyone to https://. However, my SSL certificate complains if all the content isn't served under HTTPS. Is there a way to convert all the ...
3
votes
1answer
316 views

Nginx Reverse Proxy for Tumblr

I'm currently trying to set up a reverse proxy redirecting a domain to a tumblr blog. I've set up NGinx using this Gist. My nginx configuration looks like so: upstream tumblr { server ...
3
votes
1answer
653 views

What does the '^' mean in “rewrite ^ http://test.com permanent;”

I found some configuration of nginx contains: if($args ^~ post=140) { rewrite ^ http://test.com/ permanent; } What does the ^ mean in rewrite ^ http://test.com/ permanent?
3
votes
1answer
66 views

Nginx and Google Appengine Reverse Proxy Security

The scenario is that I have a Google compute node running Nginx as a reverse proxy to the google appengine. The appengine is used to service REST calls from an single page application (SPA). HTTPS ...
3
votes
1answer
159 views

Why SPDY-enabled pages are not loading faster?

I've just enabled the SPDY module on nginx, as explanained on the SPDY module site. I expected a speed enhacement on my site, but I haven't noticed it. Using Firefox 25 and Firebug, I tried to take a ...
3
votes
0answers
79 views

How to make my websites content available as Tor .onion and clearnet .com

I'm running a website with Nginx which I would like to be accessible by Tor and by clearnet. Currently it's only reachable by clearnet, e.g. www.example.com. Of course people just can go to ...
2
votes
1answer
166 views

Google indexed my site through a subdomain, how to fix?

So I recently switched to nginx but I didn't specify my site_name in nginx.conf, which I've learned is interpreted as a wildcard domain, meaning you can access the site through any subdomain. I had a ...
2
votes
2answers
739 views

What is the default behavior of Cache-Control

If no private nor public were defined in the cache-control, e.g. Cache-Control: max-age=31461276 What is the expected behavior?
2
votes
2answers
69 views

Why do servers need to know their domain?

Besides routing traffic, why do servers need to be configured with the server name? It seems like a waste in all cases except for routing or hosting for a TLD. Nginx example: server { listen 80; ...
2
votes
2answers
36 views

Share a configuration among different “server” directive

I'm trying to share a variable across different "server" blocks, http { set $bad_ua "..."; server { if ($http_user_agent ~ $bad_ua) { ... } } } But nginx says ...
2
votes
2answers
267 views

Is static HTML the fastest?

I have been researching several different techniques to deliver web content fast, like nginx and node.js. When it comes down to performance optimization http expires headers and gzip come to mind. ...
2
votes
1answer
864 views

Vbulletin on nginx?

As an nginx fan, I need to set up a VB for a friend so I am wondering whether one can server VB site using nginx/php-fpm instead of apache? What are the specefic rewrite rules for that? How common ...
2
votes
1answer
449 views

Unlimited free sitemap generator for Nginx? [duplicate]

Possible Duplicate: Looking for a sitemap generator Google has listed a couple of SMGs but I don't want to try every single one to find the best. Google's own Sitemap Generator is released ...
2
votes
1answer
31 views

Nginx Rewrite causing problems

I wrote a little php script that reads and compresses css and javascript files. I used a rewrite to automatically redirect all resources to that script. The rule looks like this: rewrite ...
2
votes
1answer
49 views

NGINX URL Redirect - Configuration

What should be the correct configuration , if i want to redirect any request for www.mydomain.com to www.mydomain.com/page. I tried couple of options but always ended up in an redirect loop.
2
votes
1answer
153 views

How should I set up and use a CDN for my web application?

I plan to create and run my own CDN. Currently, media and other static content is being served by the web-servers which are behind a load balancer which is a waste of resources. The network structure ...
2
votes
2answers
639 views

Nginx frontend, Apache backend, and Magento

I've got a Magento installation, which works perfectly from a customer's point of view. However, when you try and do batch tasks with the admin, Nginx often closes the connection to the browser early, ...
2
votes
1answer
64 views

Simple RewriteRule [duplicate]

I'm trying to write a RewriteRule to make a simple url. I want users to be able to type enter www.example.com/somepage and have it take them to www.example.com/abc/somepage.php How can this be ...
2
votes
1answer
266 views

Trouble with images in phppgAdmin on my Nginx VPS

this is my first time using Nginx or phppgAdmin, and after placing the phppgadmin folder into my public_html folder I find that the resources for the phppgadmin page are broken, images and css ...
2
votes
1answer
2k views

nginx proxy rewrite not matching

I'm setting Nginx to forward requests to several backend services using proxy_pass A few of them I have to add rewrite rules to strip the folder off, however for this particular service, the rewrite ...
2
votes
1answer
235 views

How to avoid leeching files?

I use Kleeja script to host files and noticed that certain files are downloaded many more times than the site's visit counter indicates. So I assume that the files are being leeched. The web server is ...
2
votes
2answers
255 views

Why does modx-based site start using different domains for some content?

situation I have a modx site on a VPS with multiple domain and subdomain names. The modx site should use what I call the 'primary' domain name's 'primary' subdomain, ie www.intendedname.tld . The ...
1
vote
3answers
309 views

Multi site wordpress setup

Currently my company has 3 blogs and what I did was to install three instances of wordpress over Apache/MySQL, in different directories. The problem is that I have a Slicehost VPS with 256Mb RAM with ...
1
vote
5answers
6k views

How to block baidu spiders

Most of my visits are from baidu spiders. I don't think it helps search engines at all so I'm thinking of how to block them. Could this be done via iptables? I'm using nginx as my webserver.
1
vote
2answers
7k views

NginX redirect to PHP file if image does not exist on file server

This is what I am trying to do. I am not familiar with Nginx enough to create custom rewrite rules like you can with Apache. It would be greatly appreciated if someone could help me with the Nginx ...
1
vote
3answers
974 views

Nginx or Apache for a VPS? [closed]

I consider myself to be an inexperienced user/administrator when it comes to running my VPS. I can get by with a few CLI commands, I can set up Webmin and I can set up Yum repos, but beyond the very ...
1
vote
1answer
66 views

Setting up Nginx Load Balancing

I'm setting up an Nginx web server and and want to perform load balancing using the round robin method. This is what I have found thus far: upstream backend { server backend1.example.com; ...
1
vote
2answers
337 views

Google Analytics and framesets

I have a simple web page hosted in an EC2 machine, using nginx. Let's say my web page is reachable by: http://<my_ec2_machine_static_ip>/my_web_page I've put a Google Analytics tracking code ...
1
vote
1answer
577 views

How to prevent wpad.dat entries in log file

My Nginx access.log is FULL with lines about /wpad.dat (on a completely empty site with only "index.php") : 190.199.220.124 - - [13/Aug/2013:22:37:04 +0000] "GET /wpad.dat HTTP/1.1" 200 731 "-" ...
1
vote
1answer
619 views

Significant number of non-HTTP requests hitting my site

I'm seeing a significant number of non-HTTP requests hitting a site I just launched. They show up in the server (nginx) logs as non-ASCII and get rejected (correctly) with a 400 status. Here are ...
1
vote
1answer
19 views

How to set up Nginx directory password authentication?

How to set up? Nginx directory password authentication /usr/local/nginx/conf/vhost/xxx.xxx.com.conf site configuration files. I want to in this website xxx.xxx.com/123 folders in password access ...
1
vote
2answers
1k views

Firefox 31 not loading SSL site

Firefox 31 was released yesterday, and it seems like it has a problem with SSL: Secure Connection Failed An error occurred during a connection to api.joeyco.com. SSL peer selected a cipher suite ...
1
vote
1answer
54 views

301 redirecting a blog's RSS feed URL?

I moved my personal blog from Wordpress to Ghost this weekend, which changes the RSS feed URL from /feed/ to /rss/. By default Ghost returns a 301 redirect for /feed/, which I've verified by checking ...
1
vote
1answer
26 views

Get cipher used for HTTPS with nginx

Background I would like to run several Tornado instances with nginx as a load balancer and static file server. Since both are to be running on the same machine (or atleast the same, private network) ...
1
vote
1answer
58 views

In NginX what means location ^~

If I'm not wrong, location = / {} means "only the / folder, not the files inside, not the subfolders" location ~ / {} means "the / folder, all the files inside, all the subfolders and their subfiles" ...
1
vote
1answer
163 views

Redirecting single URL with Nginx - not working

I have been trying to redirect several single URLs to their new locations using Nginx. The URLs are from Blogger and are in the format: http://domain.com/yyyy/mm/slug. For example, I have this: ...
1
vote
1answer
330 views

Nginx Browser Caching using HTTP Headers outside server/location block

I am having difficulty setting the HTTP expires headers for Nginx outside of specific server (and then location) blocks. What I want is to something like the following: location ~* ...
1
vote
1answer
157 views

Permissions & File Structure w/ nginx & multiple sites

I am using nginx for the first time as a long time Apache user. I setup a Linode to test everything and to eventually port over my websites. Previously I had /home/user/www (wwwroot) I am looking ...
1
vote
1answer
1k views

Wordpress website with 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 requests behave normally. Things I've observed while debugging ...
1
vote
1answer
7k views

Nginx negating condition/ if else

I've came into situation where I cannot find a way around it, neither with tons googling. valid_referers none blocked something.com; if ($invalid_referer) { rewrite ^ /leech.jpg; expires ...
1
vote
1answer
186 views

Nginx: different content to specific request method

I have the image in the URL (my server): http://www.example.com/example.jpg If my user put this image URL on his site: return the image (normal). If my user put this image URL on his browser: return ...
1
vote
1answer
24 views

Server flooded with Wordpress login requests. Need advice [closed]

Recently I was looking at the nginx access logs and found on 2 ocassions a large ammount of requests pointed towards my WP login page. There were over 50.000 requests coming from 2 different IP ...
1
vote
0answers
69 views

How to query MySQL to build Nginx configuration file?

Is it possible to have a MySQL query in my Nginx config? For example: server { listen 80; $domain = [a way to get the current domain]; $server_info = [a way to do the ...
1
vote
0answers
38 views

Which webserver to use for multiple sites? [closed]

Which webserver should I use if I'm going to host about 30 sites and all are using Wordpress. Each site receives about 1k+ visitors daily. Which webserver should I use apache or nginx? I only have 1GB ...
1
vote
1answer
740 views

Lightweight PHP-supporting webserver: Nginx, Cherokee, or Hiawatha?

I had asked this question on ServerFault, but nobody answered satisfactorily, so I re-ask here. I want a lightweight webserver. The requirements are: PHP support HTTPS support Virtual domains (we ...
1
vote
1answer
227 views

Redirecting to a specific page if the visitor used a certain name to resolve the server address

How can I get visitors redirected to a specific html page if the name used to resolve the server address was a specific one? I tried if ($http_host ~ /forbiddenname/) { rewrite ^(.*)$ ...
0
votes
2answers
102 views

Do PHP-FPM (and other PHP handlers) need execute permissions on the PHP files they're serving?

I read in a post at Server Fault that PHP-FPM needs execute permissions. However, the answer in When creating a website, what permissions and directory structure? only grants read and write ...