Nginx ("engine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

learn more… | top users | synonyms

0
votes
1answer
554 views

PHP-FPM with Nginx not Working on port 80

I am trying out nginx on my Ubuntu 14.04 desktop, I have referred to some basic setup articles and have installed the latest Nginx and PHP-FPM from the apt repository. I have nginx working and can get ...
0
votes
4answers
1k views

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by ...
0
votes
1answer
4k views

NGINX SSL Connection Error

I've added an SSL certificate to my server. (Nginx running passenger & Rails). I created a CSR, uploaded to GoDaddy, downloaded the keys. Inside /srv/ssl I have www.mydomain.com.crt ...
3
votes
1answer
5k views

Two domains, two SSL certificates, one IP

I'm trying to run two domains, one with a wildcard certificate and the other one with a regular certificate from one IP and one nginx. Setup: example1.com with wildcard certificate example2.com with ...
0
votes
1answer
47 views

nginx redirect to varios directories

I am looking for a way redirect the URLrequest to various directories. For example the user calls server.com/get.php I want it randomly be redirected to server.com/a/get.php, or ...
1
vote
2answers
3k views

Adding PageSpeed Module to installed nginx

I like to add the Google PageSpeed Module to my nginx webserver on Ubuntu. This link gives a simple overview https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source?hl=de ...
1
vote
2answers
908 views

tune up performance nginx php-fpm mysql

I am running a nginx+php-fpm+mysql on virtual server with 8 cores and 16G ram My aplication is a simple API provider server, which returns JSONs generated from mysql database on requests. Datasets are ...
0
votes
1answer
1k views

Nginx alias or rewrite for Horde Groupware ActiveSync URL does not process the rpc.php file

I'm trying to setup a Horde groupware with Nginx. The webinterface works but I do not get the ActiveSync specific URL to work. The Horde Wiki explains how to use it with an Apache Webserver here. My ...
1
vote
3answers
2k views

Is it possible to extend a 504 timeout in nginx on a per location basis

Is it possible to set timeout directives within a location block to prevent nginx returning a 504 from a long running PHP script (PHP-FPM)? server { listen 80; server_name ubuntu-vm.test-api; ...
3
votes
2answers
811 views

When a server IP changes, do exising TCP (e.g. http/mysql) connections remain running

We have some PHP-FPM servers and when they need a database connection, they connect to an HAProxy server which selects them a database server to use and the connection opens. When we then want to ...
1
vote
0answers
701 views

CORS Fails on CloudFront Distribution with Nginx Origin

I have a CloudFront distribution set up with an Nginx server as the origin (a Media Temple DV server, to be specific). I enabled the Access-Control-Allow-Origin: * header so fonts will work in ...
0
votes
0answers
248 views

restart nginx after modifying settings.py and urls.py

In my django project, I modified the files settings.py and urls.py. My web application runs on nginx server. I reloaded the server using the following command: /etc/init.d/nginx reload But the ...
0
votes
1answer
202 views

How to make Nginx redirect without adding a tail string to redirected server

I have an Nginx that redirects to several different web servers based on URL path after host. My Nginx host is nginx.main.com current redirect rules are # Redirects for Math location ~ ...
1
vote
1answer
6k views

How do I change the root path in nginx

I have installed nginx on my Ubunut 12.04, I am not able to change the root directory for the nginx, This is the default nginx configuration file: server { listen 80 default_server; ...
1
vote
0answers
920 views

Server patched for CVE-2014-0224 but scanners still think it's vulnerable

We're running Ubuntu 12.04.2 LTS and nginx 1.4.0 and openssl 1.0.1. We just patched openssl to deal with CVE-2014-0224 vulnerabilities, and restarted nginx, but scanners still think we are vulnerable ...
0
votes
1answer
733 views

Nginx Rewrite Rule For File Within Folder Not Working

My problem seems trivial but after several hours of testing, researching and fiddling I can't seem to get this simple nginx rewrite function to work. There are several rewrites we need, some will ...
0
votes
0answers
45 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{ ...
7
votes
1answer
313 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.
1
vote
0answers
427 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
13 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
1answer
82 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 ...
1
vote
2answers
3k 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 ...
1
vote
3answers
2k 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
579 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
466 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
349 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
474 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; } ...
2
votes
2answers
802 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
1answer
3k 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 ...
1
vote
0answers
215 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
51 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
215 views

Nginx config with try_files and rewrite: precedence?

I'm trying to rationalize my Nginx server config, but I have a rather dumb question that I couldn't solve. So, here is the question : is try_files parsed before or after rewrite ? Asked differently, ...
0
votes
1answer
273 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
888 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 ...
1
vote
1answer
311 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
31 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
189 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: ...
2
votes
2answers
2k 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
2k 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 ...
1
vote
1answer
179 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 ...
2
votes
1answer
104 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
148 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
693 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 ...
2
votes
1answer
986 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 ...
2
votes
1answer
12k 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 ...
1
vote
1answer
326 views

How to make Nginx fire 504 immediately if 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 ...
3
votes
1answer
6k 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 ...
2
votes
1answer
5k 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 ...
1
vote
2answers
456 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 ...
1
vote
1answer
3k 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 ...