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

1
vote
1answer
2k 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
190 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
51 views

How can I allow both www URLs and non-www URLs for the same same site under nginx?

My problem is about www and non www urls. I use nginxCP, a distribution of nginx that includes cPanel and WHM. I need to be able to surf my sites hosted by this server with both non-www and www urls. ...
1
vote
0answers
136 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
1
vote
0answers
86 views

502 Bad, Gateway Ruby on Rails [closed]

Our website is currently down(hosted on Digital Ocean) with error code "502 Bad Gateway" and our web developer is currently out on Vacation. I am just an IT person on our network and I don't have web ...
1
vote
1answer
54 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
111 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
97 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
1answer
151 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
0answers
124 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
39 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
824 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
232 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
231 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 ...
0
votes
1answer
30 views

What to do with pages that leaked into SERP due to faulty server configuration

There are two sites on one server: http://www.exampleA.com lives in the root http://www.exampleB.com live in the htdocs web folder SSL on the server was configured incorrectly for ...
0
votes
1answer
558 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. ...
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
18 views

Nginx Php-Fpm Global Configuration

So, ive got everything set with 6 wp websites sitting on my lemp stack. I have noticed that every single one of their nginx configurations are the same. Is there a way I can globalize said ...
0
votes
1answer
71 views

AdSense ads not showing up after switching HTTP server to gunicorn + proxied nginx

I am developing a webpage in Django in which contains two blocks of advertisements from Google AdSense. Before, I was serving this page using Apache2, but I switched to gunicorn + nginx due to it's ...
0
votes
1answer
114 views

Difference Between php_admin_value[memory_limit] and php.ini memory_limit

I have Nginx + php-fpm + Mysql. With the php memory settings, I always set this in php.ini like this: memory_limit = 256M Now, I bumped into another similar looking setting in pool.d/www.conf file ...
0
votes
1answer
29 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. ...
0
votes
1answer
562 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
164 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 ...
0
votes
1answer
182 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 ...
0
votes
1answer
115 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 ...
0
votes
1answer
3k 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
1k 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{ ...
0
votes
0answers
29 views

NGinx Downloading instead of Serving

I have nginx setup on my ubuntu server as the web server with 3 config files (minus the site configs) All of my sites now download a application/octet-stream file rather than serving up the pages. ...
0
votes
0answers
16 views

Spam Site DNS Points to My Site [duplicate]

A spam site is using something like an A record to point to my site's ip address. As a result, if you go to spam-site.com it displays my-legit-site.com. Obviously, the same goes for any page within ...
0
votes
0answers
15 views

Location priority with nginx

I need to proxy pass some images to other server, but the link is currently overrided by other rules for static images. Here is my current (non-working) configuration (in correct order): location ~ ...
0
votes
1answer
56 views

Wordpress, Apache and Nginx: permalinks and cache

I have a server with Ubuntu 14.04.1, Apache at port 8008 and nginx at port 80 as a proxy for Apache. It runs a website based on Wordpress. I use Wordpress's plugin WP Super Cache with the following ...
0
votes
0answers
22 views

Nginx, an AWS load balancer, and configuring a website to be visible on the WWW

I have never configured an Amazon load balancer before. I have never configured a web server with an AWS machine that worked on the WWW. I have used it only as a web server that my Windows workstation ...
0
votes
0answers
45 views

nginx fails to restart after changing “client_max_body_size”

I'm testing Wordpress on Ubuntu 14.04 with Lemp and having some issues - the latest is I'm trying to import a 30mb file into Wordpress. Doing the import it says 128M limit - which I configured in the ...
0
votes
0answers
169 views

joomla url rewrite issue when nginx reverse proxy apache2

Thousand Apologies for cross posting. I am really that desperate. I have posted the same topic at serverfault but feedbacks are a bit slow and I can understand that. Just that I am expected to put the ...
0
votes
2answers
466 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
447 views

Nginx 404 not working with PHP?

I have a 404 file and it is working with nginx. However when I modify the 404 file to redirect the user it does not redirect. visiting http://site.com/404.php redirects the user. visiting ...
-1
votes
1answer
945 views

PHPFox caching? [closed]

I run a big phpfox website and I currently have server setup as follows: nginx (reverse proxy) --> Apache for dynamic content are there other ways to cache content with phpfox? I can't use memcache ...
-2
votes
0answers
15 views

Page loading problem very slow response time [duplicate]

I have Nginx server on my VPS, and since a while I noticed a heavy page load on most pages. I have vbuletin board installed on my server working just fine without any issues expect the pages load very ...
-5
votes
1answer
884 views

What the Nginx Control panel? [closed]

What the Nginx Control panel? What the Nginx Control panel? and Free thanks