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

0
votes
0answers
9 views

Cache an external site that may have a mobile version

In continuation of the answer for the "Nginx Reverse Proxy for Tumblr" question, what is the best way to cache a web-site like Tumblr with nginx, which returns distinct results depending on the ...
1
vote
0answers
19 views

How to configure nginx to dynamically read folders, user accounts/domains? [migrated]

I have cPanel and Apache 2.4 on my CentOS 6.6 VPS. I installed Nginx as a reverse proxy. Everything works fine. I have 2 domains on the VPS & I'm able to configure them both on nginx. The ...
1
vote
1answer
53 views

Non existent image files are not being handled by PHP as they should due to ngnix configuration

I am currently building a web application. In order for it to work properly I wrote this rule: location / { if (!-e $request_filename) { expires 168h; add_header Pragma public; ...
2
votes
1answer
112 views

Optimize TOR website

There is VERY little to find about optimizing a website which runs in the tor network. Besides installing the tor daemon, what can you do? Are there any tricks like -I don't know- connecting it to ...
1
vote
1answer
19 views

How do I get ngix to stop listening on port 80?

I'm running a node.js webserver on an Amazon Linux EC2, but I can't listen on port 80 because there's an nginx server listening on that port: [ec2-user@ip-172-31-39-178 server]$ sudo netstat -tulpn ...
3
votes
1answer
76 views

Why do some Nginx configurations block download agents using Wget?

I noticed that some Nginx configurations block download agents using Wget like this: if ($http_user_agent ~* LWP::Simple|wget) { return 403; } Why block Wget? If I use the above code in my ...
1
vote
0answers
35 views

How to filter GET requests with Nginx, keep getting 504 after [GET] “/manager/html”

I was recently unable to reach my website, receiving a 504 time-out error instead. I checked the logs and found a GET request for /manager/html. I realize this was a failed attempt to reach a control ...
1
vote
1answer
84 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
1answer
56 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 ...
2
votes
1answer
45 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 ...
4
votes
1answer
190 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 ...
0
votes
1answer
25 views

Page requesting content from another IP

I was running a drupal website on Server 01 with IP1 on the domain name example.com with the configuration centos 6 and apache. As we were having a traffic spike, we wanted a more powerful machine. ...
1
vote
2answers
2k 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 ...
0
votes
1answer
288 views

Code for redirecting an HTML page without an extension using an .htaccess file results in a 404 error

I'm trying to redirect an HTML page to a WordPress page which has no extension. The result of redirecting example.com/fa/home.html to example.com/fa/ is a 404 page not found. As you can see they're ...
0
votes
1answer
74 views

Domain name name repeated in the URL — what is wrong with my Joomla/nginx setup?

I have a joomla site being served from an nginx server with the following config server { listen 80; server_name heftpathology.com; server_name_in_redirect off; access_log ...
2
votes
2answers
43 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 ...
0
votes
1answer
121 views

Tracking 502 bad gateway error

I moved my Wordpress site to WP Engine and now I constantly get 502 errors. I spoke with support and they said that its because I have a lot of DB queries. I ran some tests and my frontpage only has ...
1
vote
1answer
77 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 ...
3
votes
1answer
104 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 ...
4
votes
1answer
115 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 ...
0
votes
1answer
71 views

Remove www from HTTPS request in Nginx

I have the following code: server { listen 443; server_name www.domain.com; ssl on; ssl_certificate /etc/nginx/ssl/domain.com.crt; ssl_certificate_key /etc/nginx/ssl/domain.com.key; return ...
1
vote
1answer
39 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
76 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; ...
0
votes
2answers
144 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 ...
2
votes
1answer
57 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
2answers
99 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; ...
1
vote
1answer
73 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" ...
0
votes
2answers
332 views

Nginx, URL special characters and punycode

I have an URL with special carachters (nicolòzanetti.com), and I'm having problem telling nginx how to handle it to the correct site. With a basic configuration:(the * in the urls is to tell ...
0
votes
0answers
67 views

Random Apache and NginX stops

I have a virtuell server from strato (german hoster) running on ubuntu Ubuntu 12.04.1 LTS with plesk. Lately I have problems that my webserver once in a while doesn't respond request. so I startet ...
0
votes
1answer
1k views

How to leverage browser cache using .htaccess on nginx?

I'm trying to increase the pagespeed of our website ubercore.co. I'm using PageSpeed Insights for Chrome extension to analyze the pagespeed. It has suggested me to "Leverage browser cache". This is ...
0
votes
1answer
583 views

How to map requests to an external directory

I have a directory/application that is located outside of the web root directory of my site. Say the site is here: /var/www/site/htdocs/ And the external app is located here: ...
0
votes
1answer
310 views

Nginx writing separately to two different logs

I've recently taken over as Sysadmin of a site, and the first thing I noticed was that there were two Nginx access_logs defined: access.log and access_new.log, and they were both being written to. ...
2
votes
1answer
181 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 ...
1
vote
1answer
212 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: ...
3
votes
1answer
185 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
1answer
403 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 ...
0
votes
1answer
138 views

SEO: Single URL rewrite from one app to another

I have two web applications running on two different servers. I want one, example.com/hello, to redirect to the second, hello.com. But I want both to contribute to each other's SEO ranking. What is ...
1
vote
1answer
764 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
0answers
84 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
1answer
391 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
2answers
390 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 ...
2
votes
2answers
276 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
65 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 ...
0
votes
2answers
1k views

Ruby on Rails - Passenger Nginx - 403 Forbidden

I've been searching for an answer for a long time now so I'll just try here... I'm trying to get an Ruby on Rails application running with passenger and nginx but I'm getting 403 forbidden when I'm ...
0
votes
1answer
738 views

Nginx proxy_pass 404 error, don't understand why

I'm trying to pass off all calls to /api to my webservice but I keep getting 404s with the following config. Calls to / return index.html as expected. Does anyone know why? upstream backend{ ...
2
votes
2answers
283 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 ...
2
votes
1answer
184 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 ...
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 ...
2
votes
2answers
882 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
1answer
909 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 ...