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

0
votes
1answer
40 views

Nginx 301 rewrites using regex

I moved to a new software and now need to catch the old urls and rewrite them to the new ones. Here is an example: Old url: ...
1
vote
2answers
107 views

Nginx server block not working

Disclaimer: Just to clarify, I'm completely new to Linux, but I've configured everything via google searches and personal research. I've got a Debian Wheezy server with LEMP stack that I intend to ...
0
votes
2answers
369 views

Nginx uLimit 'worker_connections exceed open file resource limit: 1024'

I keep getting this error in nginx/error.log and its driving me nuts: 8096 worker_connections exceed open file resource limit: 1024 I've tried everything I can think of and cant figure out what is ...
1
vote
1answer
218 views

302 redirect loop with nginx and Wordpress

I've been searching a couple of hours in Serverfault trying to solve this problem but I can not find a solution. What happens is: I am having a 302 redirect loop using wget in my site, but not using ...
0
votes
2answers
90 views

nginx : stop error log from search engine bots

I have a centos 7 server with nginx 1.6.2 and I would like to stop error log when a bot from a search engine make a 404 error in my website. This, in order to have a clean error log, with only "true ...
1
vote
1answer
33 views

nginx matching similar, but wrong location

I have a few exposed JSON scripts / programs for quick information gathering from a server. I use nginx to expose those as just raw urls. So given the following locations: location ~ ^/api/status/? { ...
0
votes
1answer
38 views

Negative effects of setting nginx workers too high

I've seen numerous posts advising how to set nginx's worker_processes, but very few detailing what happens when this is set too high. I'm about to run some benchmarks, but I'd appreciate advice on ...
0
votes
1answer
53 views

Cookieless folders with NGINX

I want to force all pages on my WordPress setup to not set any cookies, except for the file and folder: wp-login.php and /wp-admin # disable cookies globally fastcgi_hide_header Set-Cookie; if ...
0
votes
0answers
48 views

Debugging a Node.js EMFILE Error

I have a Node.js API that gets heavy traffic. In my logs, I regularly see the following error: events.js:71 throw arguments[1]; // Unhandled 'error' event ^ Error: accept ...
0
votes
2answers
75 views

SSL/HTTPS issue (no padlock icon) on Safari when using ngixn+unicorn

I have an application that runs on nginx+unicorn. This is how my server block looks like upstream rtdev{ # fail_timeout=0 means we always retry an upstream even if it failed # to return a good HTTP ...
3
votes
0answers
67 views

Odd performance fluctation with php-fpm and nginx

I'm running a load test against a web service. It's a php application running on php-fpm and nginx, with fastcgi. There is a MySQL backend being used for small reads only. Invariably, I'm seeing a ...
0
votes
0answers
123 views

502 http code when reloading nginx upstream servers

I'm having trouble load testing a web application running in docker. I'm running 2 containers of the same application, In hopes that when I bring one down the traffice will relay to the next server. ...
0
votes
1answer
94 views

uWSGI cannot load virtualenv

I'm setting up a Python app using nginx and uWSGI. My dependencies are in a virtualenv. If I activate the virtualenv manually, everything works by running this command: uwsgi --ini uwsgi.ini But if ...
-2
votes
1answer
67 views

What is serving my nginx on the docker? [closed]

I got the cheapest VPS on Digital Ocean. I followed this guide, everything works like a charm.. But now I want to serve multiple nameservers on the same ip, so I need to figure it out how this is ...
1
vote
1answer
131 views

nginx wildcard server_name for subdomain gives index.php 404 error

I've been using this server configuration for wordpress which works great on my local machine: server { server_name example.example root /home/user/sites/example/example/html; index ...
0
votes
0answers
89 views

nginx operation not permitted

After last reload nginx i have error nginx: [emerg] chown("/gypost/uploads/00", 1001) failed (1: Operation not permitted) 192.168.0.91:/gypost/mail/u 247G 17G 218G 7% ...
0
votes
2answers
55 views

Nginx http prefixes in upstream server

I'm trying to use nginx to proxy pass to two docker containers. Here is my upstream conf file: upstream api_servers { server http://192.168.49.4:49155; server http://192.168.49.4:49156; } This ...
-1
votes
2answers
84 views

nginx load balancing images not loading

Below is my load balancing configuration.my other servers contain nginx unicorn based application setup. When i tried above configuration the images are not loading. I have total three servers 1 ...
2
votes
1answer
68 views

Strange CPU Loading peaks on web server

I have strange, very strange peaks of CPU loading on my website. normal loading about 2-3, when i have this peaks it is about 100-150 peaks may be in any time. not depends my normal loading ...
1
vote
1answer
70 views

Why deployment sh script don't fails on failed nginx reloading?

I have sh script that restart nginx like the following: #!/bin/sh -e set -e error_exit() { d=$(date '+%D %T :: ') echo "$d Error: $*" >&2 exit 1 } if ! sudo service nginx ...
2
votes
1answer
80 views

nginx: redirecting to SSL based on the original request URL (not $server_name) [duplicate]

I have an nginx config that is similar to this: server { server_name my-english-site.com my-french-site.com; listen 0.0.0.0:80; rewrite ^ https://$server_name$request_uri? permanent; } ...
0
votes
0answers
37 views

What does Nginx Proxy Filter in Fail2ban really do?

What does Nginx Proxy Filter in Fail2ban really do? I am currently setting up Fail2Ban for Nginx. Almost everywhere I've read, they all have included a setting for [nginx-proxy] proxy filter. From ...
0
votes
1answer
90 views

nginx server, multiple users editing their own files via SFTP

I'd like to have a Debian server set up so that different users have their own domains that only they can edit, e.g.: /home/ + /bob/www/ + oldsocks.com/ + nosepickers.org/ + /joe/www/ + ...
1
vote
2answers
218 views

Varnish 4 Working Config (optimized) for Wordpress (default.vcl)

I have successfully set up varnish 4 on my nginx 1.6.2 it is working but as per the test on http://www.isvarnishworking.com/ it shows Varnish appears to be responding at that url, but the ...
0
votes
1answer
68 views

Single http/https server block in nginx with upstream https and upstream http

Our current nginx setup handles http/https with a solution similar to the one specified in this answer nginx.conf http { upstream backend { server backend.com } upstream ...
0
votes
1answer
72 views

nginx suddenly trying to bind on the wrong port

I'm running on a server that has Apache on port 80. I also have nginx installed, and just one conf file in /etc/nginx/sites-enabled which has listen 8888; specified. This works perfectly fine. Now, I ...
0
votes
2answers
69 views

How to tune a web server and prep it for lots simultaneous visitors?

I have another related question but I'm deviating from it since I'm changing my server to use nginx instead of Apache. Related: Server problems, running out of RAM, really high load average I'm ...
0
votes
0answers
37 views

EC2 Bad Gateway with torquebox and nginx

I set up an EC2 instance with torquebox and nginx. Torquebox starts without any errors, but I cannot access it at port 8080. Not even if I add a VPC rule to open that port. I get Gateway timed out if ...
-1
votes
2answers
76 views

How to point CNAME to Digital Ocean droplet

Having an issue trying to point a CNAME to my Digital Ocean droplet I created a CNAME on DNSimple and pointed it to the IP address of my Digital Ocean droplet: ironman4x4.adamgeorge.com I've tested ...
-2
votes
2answers
178 views

Installing ngx_pagespeed with nginx 1.6.2 (Backport) on debian 7 (wheezy)

I am struggling to install nginx 1.6.2 with module ngx_pagespeed 1.9.32.1-beta Can anyone please help me to install this on my debian 7. Any working tutorial i have tried ...
1
vote
1answer
84 views

Nginx: How to limit request rate based on user agent

Trying to get the following behavior working in nginx A default rate limit of 1r/s for each ip when using a browser. A rate limit of 10r/s for bing and google spiders. Reject bad bots. Unfortunately ...
0
votes
1answer
112 views

With nginx serve a custom 404 page with header 404, without changing the browseraddress

How do I force nginx to serve a custom 404 page while responding with a 404 header, without changing the address of the browser so the user can easily retype? I tried this at my testsite (added after ...
4
votes
2answers
227 views

Redirect users connecting with SSLv3 within nginx

I was looking to drop all support for the SSLv3 due to POODLE, but found that there are still some people coming from old browsers for the likes of IE on Windows XP. How do I detect these SSLv3-only ...
1
vote
1answer
47 views

How to use a custom variable for the scheme in a rewrite rule in nginx

Is there a way to get nginx to treat a custom variable the same as it treats the $scheme in a rewrite rule? For instance: rewrite ^/redirect http://example.com; # and rewrite ^/redirect_with_scheme ...
0
votes
1answer
81 views

“nginx is not running” - but it actually is

Running Ubuntu Server 14.04.1 LTS Checking nginx status says it's not running: $ sudo service nginx status * nginx is not running However, it is, as the websites it's powering are working, and: ...
-1
votes
1answer
41 views

Apache mod_rewrite to Nginx rewrite

I have a virtual private server with whm/cpanel. I have installed nginx_admin plugin. The plugin has created virtual host files (example.com, *.example.com and manage.example.com) In my old apache ...
1
vote
1answer
29 views

API and main page as two separated processes

SITUATION I created an REST API for my mobile application and now I want to create a website. API so far is very very simple, just for a couple requests like 'get list of contents', 'update some ...
0
votes
1answer
38 views

Nginx forward all requests to another domain

I have been struggling to get this whole setup to work. I've found bits and pieces on the net but nothing that solves all of my requirements. I need to do this to make IE8 work, so unfortunately my ...
0
votes
0answers
71 views

Use nginx as reverse proxy for outgoing mail

We have a production server running a singlepage web-app and a separate proxy server, for security reasons. Every request to our web-app is handled by our reverse proxy (nginx) on the proxy server. So ...
1
vote
1answer
177 views

nginx logging to access.log.1 instead of access.log, logrotate failing?

I have an nginx instance that is set to log access to /var/log/nginx/access.log and errors to /var/log/nginx/errors.log, but as soon as logrotate runs each week, the file gets moves to *.log.1 and the ...
0
votes
0answers
56 views

JS and CSS file are not loading due to missing forward slash

My client moved to new server which nginx & percona server. Problem is the forward slash is being removed from end of the url. as you can see in the picture: therefor the design files such as ...
-1
votes
1answer
85 views

nginx proxy keeps getting bad gateway

I am running a CentOS7 virtual machine and trying to proxy it to a subsonic server which is running on Windows Server 2012. When I was using apache it was working without issues but I am currently ...
0
votes
3answers
224 views

nginx poodle fix configuration

I have a dedicated CentOS web server (with Plesk 12) and I am trying to disable SSL 3. I have been everywhere trying to disable SSL 3 and tried to apply the fix as detailed within other posts, but ...
0
votes
1answer
67 views

increase nginx active connection more than 65535

currently I'm doing setup for nginx to accept C1M, I do in my Virtual BOX with Centos 7.0 and RAM 10G. Here my sysctl.conf configuration. fs.file-max = 9999999 fs.nr_open ...
0
votes
0answers
170 views

Upgraded to Ruby version 2.1.2, passenger still on 1.9.3

I installed Ruby 2.1.2 using RVM, and changed the nginx.conf file with the appropriate passenger_ruby and passenger_root paths, but my Rails application is still running on Ruby 1.9.3. Why is my Rails ...
0
votes
2answers
69 views

Nginx silently dropping header lines that exceed 1128 bytes

I have Nginx set up as a reverse proxy to a uWSGI application (a Django app). Due to the nature of the content that the Django app is hosting, sometimes the URLs get long. Really long. Because of ...
2
votes
1answer
107 views

Nginx resolver address from /etc/resolv.conf

Is it possible to set resolver address in nginx proxy configuration from /etc/resolv.conf? It can be useful for example in docker or in virtualenvironment.
0
votes
1answer
74 views

Nginx proxy_pass based on file extension and query string

I need to proxy_pass static assets (.js .css) based on file extension and query strings. For example: domain.com/foo.css - go to upstream1 domain.com/foo.css?V=1234 - go to upstream2 Reason is I ...
0
votes
1answer
35 views

Restricting subdomains using regex in nginx

I'd like to know how to limit(not rate limiting) subdomains effectively. Here's my example where the redirecting of invalid subdomains is handled by an if statement with regex matching. server { ...
0
votes
1answer
36 views

Nginx redirection to url writen in requested file

I need to setup dynamic redirections. For example, a user open a link : http://www.example.com/2/3/4/ and see the page on the following address: http://www.example2.pl/something. I know about ...