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
0answers
23 views

nginx doesn't match server names

I created a DNS zone using Bind9 and I'm pretty sure I did it right because when I type my domain name it goes to my server IP. now comes nginx turn , this is my actual configuration : server{ ...
0
votes
0answers
15 views

Adding extra header using middleware module in django

I was trying to log the user-name in the nginx logs. As I am not doing basic http authentication, adding $remote_user in log_format doesn't work. I will need my application to tell Nginx what the ...
4
votes
1answer
38 views

Storing username in nginx logs

Is there a way in which user-name or user-id can be stored in nginx logs. I tried inserting $remote_user in the log_format directive but it doesn't seem to work.
0
votes
0answers
75 views

Unable to complete secure transaction - Nginx Opera browser

i have this nginx.conf file worker_processes 4; worker_priority 15; error_log logs/error.log notice; pid logs/nginx.pid; events { use kqueue; # event method, kqueue ...
1
vote
0answers
47 views

Nginx not getting the real visitor IP in server block

I am using a loadbalancer in my current setup, requests come from ip 10.71.128.13. I am using Nginx as a front to a Gunicorn backend. I want to get the real IP address of the visitor and log it (not ...
2
votes
0answers
12 views

Mechanism to get the current running configuration values in nginx [duplicate]

Trying to find an easy and convenient mechanism to get the current configuration values from a running nginx instance. The ideal solution would be a url that I could point to that would print the ...
0
votes
0answers
33 views

Accessing an environment variable across nginx w/ Lua and Rails [migrated]

I'm implementing something like this to let one service allow access to separate upstream service in nginx. Briefly: A Rails app sets an HMAC cookie, which is then checked by some Lua code thanks to ...
0
votes
1answer
29 views

nginx - Why can't I access my error page directly?

I have a NodeJS application to which I forward requests using proxy_pass. When the NodeJS application is off, I want to display a custom error page. So I put a 5xx.html file into ...
0
votes
2answers
119 views

Varnish + Nginx + multiple IP addresses

This is my first shot at making Varnish work on my dedicated server which hosts 2 domains with 2 separate IP-addresses. My simplified setup is as follows: Nginx conf server { listen ...
0
votes
2answers
34 views

Django fails to find static files served by nginx

I know this is a really noobish question but I can't find any solution despite finding the problem trivial. I have a django application deployed with gunicorn. The static files are served by the ...
0
votes
0answers
45 views

How Should I Properly Handle Multiple Nginx Location Blocks?

I think I am getting close, but I am missing something important in nginx configuration. I would like all files ending in .php to be handled by fastcgi, so I have the following block: location ~ ...
0
votes
0answers
37 views

PHP-FPM pool stops responding and fails to restart

I am running PHP as PHP-FPM behind Nginx. Occasionally one of the pools stops responding to requests. It seems that nginx is accepting the connection, passing it to PHP-FPM but then PHP-FPM is not ...
1
vote
0answers
51 views

Nginx + PHP-FPM Too Many Resources

My Server has the following Specs CPU: 6 Cores Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz RAM: 32 GB I have a problem with nginx+php-fpm. They are taking too many resources for an unknown reason. ...
0
votes
0answers
52 views

Nginx proxy with SSL Authentication

My proxy needs to be mutually authenticated, and the forwarded-to server (in another cluster) needs to be mutually authenticated. Therefore, the proxy needs to forward the request to that server using ...
0
votes
1answer
40 views

nginx points the sub-directory of an alias folder to the base directory

I am new to Nginx. Now I have a confusion on nginx configurations: My web site contains folders in different locations: location / { root /Path1; } location ^~ /download { alias /Path2; } ...
1
vote
2answers
139 views

amazon ec2 ubuntu with gitlab and nginx - cant load?

Ok, so I've spooled up an Amazon EC2 server running Ubuntu, and then followed the instructions below to install GitLab; http://doc.gitlab.com/ce/install/installation.html The only step I've not been ...
0
votes
0answers
18 views

How to make lighttpd respect X-Forwarded-Proto when constructing redirects for directories?

We have an nginx proxy at tools.wmflabs.org that receives requests by http and https and passes them by http on to lighttpds on a grid (one lighttpd per top-level path). Requests that reach the proxy ...
0
votes
1answer
47 views

php-fpm use a lot of cpu

I use wordpress on Ubuntu 12.04 with Nginx + php-fpm on my VPS. There are 2 CPU cores + 4096Mb memory. I've moved mysql database to antoher server and set remote access. There are about 300 online ...
0
votes
0answers
49 views

Nginx and dynamic X-Forwarded-For blocklist

I am running Nginx behind a proxy. I am getting visitors' real IP addresses through X-Forwarded-For HTTP request header. I'd like to block individual IPs based on a dynamic block list, up to 10000+ ...
0
votes
2answers
28 views

How can I instruct nginx to interpret an individual file as php

A legacy application relies on the following .htaccess rule for an individual file <Files MyFile.html> AddType application/x-httpd-php .html </Files> The new machine has nginx and ...
0
votes
1answer
23 views

Nginx config with try_files and rewrite : precedence?

Good morning, everybody. Firstly, this question may have been already asked, but I searched ServerFault during about 15 minutes without finding it, so, if it was already asked, please accept my ...
0
votes
1answer
37 views

Nginx possible bug with dashes (-) in server_name

The following Nginx (v 1.2.1) configuration server { listen 80; server_name aaa.example.com; root /var/www/aaa; } server { listen 80; server_name hello-world.example.com; ...
0
votes
1answer
48 views

Amazon EC2 Web server in Load Balancer gives 503

we've been running our web servers at Amazon with load balancer and auto-scaling for over a year with no problem. All of a sudden today the request began to get aborted with the error: 503 ... Backend ...
0
votes
1answer
33 views

Whitelist nginx proxy_pass $args

I have nginx configured to proxy requests : server { listen 80; server_name proxy.mydomain.com; location /proxy { resolver 8.8.8.8; proxy_pass $args/; } } So ...
1
vote
0answers
18 views

Make nginx config like apache2 virtualhosts

I have web server with apache2 with many subdomains on it like, domain.com, abc.domain.com, def.domain.com etc. etc. Now I got a new nginx server and want to set it up like apache2, so to test I ...
0
votes
0answers
20 views

compress html pages on Nginx with mod_strip

I have installed Nginx 1.4.7 on my VPS and compiled mod_strip from this site https://github.com/evanmiller/mod_strip and tried to run it on my vhost block as it says in the manual like the code below: ...
1
vote
2answers
98 views

Nginx reverse proxy to another nginx server serving static files

I have an Nginx server hosting a web app which works fine when directly accessed. Its config is below server { listen 8000 default_server; listen [::]:8000 default_server ...
1
vote
3answers
81 views

Cannot connect to HTTPS port on Ubuntu

I've installed a new SSL certificate and set up Nginx to use it. But requests time out when trying to hit HTTPS on the site. When I telnet to my domain on port 80 it connects, but times out on port ...
0
votes
0answers
89 views

install nginx always gives me SSL_OP_MSIE_SSLV2_RSA_PADDING error

My goal is to install nginx with RTMP module on my Debian server Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64) I try to install it from source as described in many tutorials: ...
1
vote
1answer
30 views

Cookies Not Setting in Load-Balanced Environment

I have an Nginx load balancer load balancing two nginx servers serving PHP content (Moodle) up. They share the same database and use the same sessions directory using an NFS share on a separate ...
0
votes
0answers
45 views

Nginx to serve files from multiple locations - resources paths optimization

In my rails 4 app, I have assets pipeline to process my custom js/scss. I also use /vendor/assets/javascripts as a place for 3rd party libs - jquery, requirejs... Those, I don't want to process by ...
2
votes
1answer
46 views

How can i serve multiple static content using Nginx server?

I am newbie trying out Nginx and hence the question might be silly. Requirement: How can a single HTTP call to an Nginx server retrieve multiple static content? For example: ...
0
votes
1answer
23 views

unable to connect to nginx hosted website from most pcs, yet my local pc connects fine?

i run a website (remotely) using nginx and php, which has been ok for a long while. i recently changed the domain name to a new name and now most web browsers/pcs are unable to connect to the website. ...
1
vote
1answer
83 views

How to conditionally match location in nginx

I'd like to set up nginx location match but only for a specific source address. Unfortunately if I already match a location, but not the condition I can't fall through to the next location. What's the ...
0
votes
1answer
85 views

How do I deny all requests not from cloudflare?

I've recently gotten denial of service attacks from multiple proxy ips, so I installed cloudflare to prevent this. Then I started noticing that they're bypassing cloudflare by connecting directly to ...
0
votes
1answer
56 views

How to configure nginx so it works with Express?

I'm trying to configure nginx so it proxy_pass requests to my node apps. Question on StackOverflow got many upvotes: http://stackoverflow.com/questions/5009324/node-js-nginx-and-now and I'm using ...
0
votes
0answers
119 views

Either, nginx+php-fpm bad config or nginx+php-fpm cannot handle high query?

I have wordpress installed in my server configured(hopefully with nginx+php-fpm+mariaDB). I am trying to import using wordpress importer a 1.5MB xml file. Everytime I try to upload it using the ...
1
vote
1answer
44 views

How to make Nginx fire 504 immediately is server is not available?

I have Nginx set up as a load balancer with cookie-based stickiness. The logic is: If the cookie is NOT there, use round-robbing to choose a server from cluster. If the cookie is there, go to the ...
0
votes
0answers
222 views

NGINX - CORS error affecting only Firefox

this is an issue with Nginx that affects only firefox. I have this config: http://pastebin.com/q6Yeqxv9 upstream connect { server 127.0.0.1:8080; } server { server_name ...
0
votes
1answer
226 views

Nginx + PHP-FPM on Centos 6.5 gives me 502 Bad Gateway (fpm error: unable to read what child say: Bad file descriptor)

I am setting up a standard LEMP stack. My current setup is giving me the following error: 502 Bad Gateway This is what is currently installed on my server: Here's the configurations I've ...
0
votes
2answers
45 views

All nginx access logs from 127.0.0.1 (so can't use fail2ban)

Problem I'm trying to configure fail2ban to block ddos attacks using the chunk shown here. Basically it looks at all requests and if any single IP makes more than 240 requests over 60 seconds it ...
0
votes
1answer
305 views

Unable to configure Nginx as a reverse proxy for elasticsearch on another server

I'm trying to use Kibana on a server A to access elasticsearch on a server B. elasticsearch is protected with a basic auth authentication on server B. Kibana is also protected with basic ...
1
vote
0answers
176 views

Improving TCP performance over a gigabit network lots of connections and high traffic for storage and streaming services

I have two servers, Both servers hardware Specification are Processor : Dual Processor RAM : over 128 G.B Hard disk : SSD Hard disk Outging Traffic bandwidth : 3 Gbps network cards speed : 10 Gbps ...
1
vote
1answer
109 views

Installing SSL certs with nginx on Amazon EC2

I finally got a cert from an authority and am struggling to get things working. I've created the appropriate combined certificate (personal + intermediate + root) and nginx is pointing to it. I got ...
0
votes
1answer
39 views

Is it possible to limit output bandwidth between eth0 and lo?

I'm trying to limit the bandwidth between my eth0 output (nginx proxy) to my loopback inteface (apache) by filtering on destination port. Incoming Packet -> Eth0 -> 0.0.0.0:80 Nginx -> tc ...
-1
votes
3answers
76 views

Nginx serve one, specific PHP script for all .HTML requests

In short, I need to run a specific php file, patch.php, every time someone requests an html page on this site... We recently moved from an Apache server to an Nginx server, and everything has been ...
0
votes
0answers
37 views

Remove old logrotate entries

Recently I have removed nginx on my server running Debian Linux and since then, I keep getting the following email every day: root@server:~# tail /var/mail/root Content-Type: text/plain; ...
0
votes
0answers
34 views

Can nginx report on incomplete HTTP sessions?

I have a situation where an HTTP client is connecting to my server, sending some header info, and disconnecting before completing the transaction enough for the server to respond. These connections ...
0
votes
1answer
50 views

All Passenger processes suddenly hang - backtrace indicates reading POST data?

I've been having problems with my nginx/Passenger server where requests appear to be getting stuck, any subsequent requests don't complete, the queue gets up to its max, and the site starts serving ...
0
votes
3answers
95 views

Enabling spdy in nginx fails spdycheck.org

I'm trying to enable spdy with nginx 1.6.0 but spdycheck.org is giving me two complaints: And My nginx configuration file is as such: server { listen 80; listen 443 ssl spdy; ...