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

-1
votes
1answer
46 views

php-fpm using 100% CPU and nginx gives 404

I am playing around with Magento CE on Nginx and its working fine. Problem starts when I do a 500 user load test. The php-fpm process hogs up all the CPUs to 100% and I start getting 404 as the ...
0
votes
1answer
15 views

SSL on JBoss and nginx

I've got an application that runs on JBoss server. Also I've got nginx as reverse proxy server for this application. Now I want to configure ssl. Do I have to configure it on both servers? JKS for ...
0
votes
1answer
29 views

PHP-FPM TCP connections not terminating in time

I'm serving Wordpress pages via nginx/PHP5-FPM using APC caching (through the W3 Total Cache plugin). Nginx communicates with PHP-FPM via TCP sockets on port 9000. I've adjusted the number of max ...
1
vote
2answers
61 views

nginx suddenly redirecting everything to 403 page, can this be debugged or traced?

I'm not sure what happened to my nginx install. Suddenly all page requests are being redirected to the 403 page. Yesterday I tried to add a user agent to block, restarted service from that point ...
1
vote
0answers
19 views

How to route PHP files to 2 different backends with nginx

I have a server running Nginx that is currently proxying all PHP script to Apache with the following location directive: location ~ \.php$ { proxy_pass http://@apache; } I'd like to introduce a ...
0
votes
0answers
12 views

Unable to process more than constant number of parallel connection in curl

I use curl_multi_init function to perform about 1 000 parallel connection to the same server (by API). I accomplish it using PHP, Nginx and Squid. Unfortunately, after some number of connection I am ...
1
vote
1answer
28 views

Aliases in nginx/apache vs CNAME record?

In one of my nginx sites-available configuration file, I can specify a server name alias, like so: server_name example.com www.example.com; If I had an Apache server, I can do something similar ...
0
votes
1answer
25 views

Nginx Cache with PHP-FPM

I have the folowing niginx config file: server { listen 80; server_name pajilleros.com www.pajilleros.com; access_log off; location / { root ...
0
votes
0answers
14 views

nginx not handling proxy_redirect when forwarding through another proxy

This is my configuration: location /nexus { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote-addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header ...
0
votes
0answers
17 views

Async synchronization filesystem strategies

I have the following scenario: Several front-end web servers (nginx + load balancer) serving a web app, each one having a local filesystem, to where user uploads are placed temporarily. An external ...
0
votes
0answers
23 views

How do I configure Nginx/Apache for a single web application split between Rails and PHP?

Questions like this have been asked before, but I have yet to find one meeting my specific needs. We currently have hosting with Media Temple running CentOS 6.6. We have what's currently a PHP ...
0
votes
1answer
12 views

Nginx Rewite - Matching End Urls not working

Trying to redirect urls like these: http://example.com/vehicles/cars/author/xyz http://example.com/plane/author/xyz to these: http://example.com/profile/xyz I tried this Nginx Rewrite, but its ...
-2
votes
1answer
27 views

nginx is wrongly serving all subdomains [closed]

My nginx server is serving content to all subdomains, even though I've removed the default_server from the main server block. So there is absolutely no reference whatsoever to "default_server" or ...
0
votes
1answer
29 views

set server_name in Nginx based on global variable

I have a server with nginx that runs a site in production that should be replaced with a new site in the near future. In order to be ready to that day - I'm preparing all the configurations that are ...
0
votes
1answer
17 views

Nginx: redirecting a directory to a virtual server

I have two Nginx virtual servers: server { listen 80 default_server; server_name antergos1; root /data/ } server { server_name nagios; root ...
1
vote
1answer
23 views

php-fpm log filling with configuration test successful

I have nginx and php-fpm running and I just noticed my /var/log/php5-fpm.log is filling with this message once a second or so: NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful ...
0
votes
0answers
34 views

Accidentally set expires max in http block

Yesterday, I accidentally set max expires option in http block. What should I do to clear client cache ? I'm using nginx as a reverse proxy for my rails server (unicorn), rails has a asset digest at ...
0
votes
0answers
15 views

nginx different root based on host ip

Does anyone know of a method to use a different server root based on the remote host's IP? This fails with a "root not allowed here" message: if ($remote_addr = myip) { root /some/other/root } ...
1
vote
1answer
21 views

Nginx Access.log status results according to different file

nginx access.log, I want to do status="200" access_log /var/log/access.log main; status="444" access_log /var/log/access444.log main; status="401" access_log /var/log/access401.log main; this can ...
0
votes
0answers
15 views

How do I troubleshoot a nginx 413 error?

I'm getting a 413 error on my laravel forge site using nginx. I updated php.ini for cli and ftp to 1000m and updated my nginx config for client_max_body_size = 1000m. Still getting that 413. The file ...
1
vote
1answer
23 views

Nginx: request files without extension

How can I request html pages on a nginx server without the extension? Ie: example.com/about should return example.com/about.html. This should be true for all the html pages. I have something along ...
0
votes
1answer
46 views

nginx php-fpm not fully working

I'm using nginx-1.6.2_1,2 with php5-5.4.36 on: # uname -a FreeBSD X.X.X 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0 r265974: Wed May 14 07:57:04 PDT 2014 root@X.X.X:/usr/obj/usr/src/sys/R610 amd64 ...
2
votes
1answer
28 views

Serving Landing page using nginx. Unable to get '/' to work while other urls are working fine

I am trying to set up a landing page for my site( say example.com) and I want to serve my own html as the page to load when someone types 'example.com' on their browser. I am using nginx as my ...
1
vote
0answers
37 views

Can't go to route using nginx and Express.JS

So I have express.js set up behind nginx and when I go to website.com/users, I get a 404. But when I go to website.com, the page loads fine. This appears to be all other routes too, I can't get to ...
2
votes
1answer
31 views

Different server response time for 2 web pages with the same view and template?

I've recently been facing hugely increased server response time for some of my web pages (response time in the range of 10-20 seconds). For example, for the page http://www.edmhunters.com/afrojack/ - ...
0
votes
0answers
29 views

How to enable apache userdir when using nginx as reverse proxy

I have a setup using apache 2.4, php-fpm, and nginx. I need to enable the apache userdir module so http://ip-of-server/~user would be equivalent to the http://example.com normal site. I can't get it ...
-2
votes
2answers
40 views

Nginx as a proxy server for a local network

I'm currently using squid as a proxy server for my local network, but I'm not entirely satisfied with it. Is Nginx also suitable for use as a proxy server on a local network? Is it actively being used ...
1
vote
0answers
15 views

Risks of letting ZNC have my private SSL key

I have a single VPS running a few websites and also my ZNC IRC bouncer. I purchased a wildcard SSL certificate for all my subdomains (this was silly; it would've been much cheaper just to purchase ...
1
vote
0answers
28 views

Nginx - branch on parameter in location context

I'm trying to use the HttpEchoModule to sleep for a random amount of time when i hit a location with a specific parameter: location = /api/shouldSend { if ($arg_blah = "test") { ...
0
votes
1answer
57 views

Rate limit new connections in IPTables instead of Nginx or HAProxy?

I would like to use some form of rate-limiting both 1) new TCP connections and 2) requests over an existing connection to HTTP(S). I will probably handle #2 with nginx or HAProxy (because I have more ...
0
votes
1answer
37 views

Nginx ip_hash behind proxy (Cloudflare)

We use nginx for our load balancing, and we need ip_hash to guarantee our server work fine. When we started using cloudflare, most our requests go for one server as it seems all of them are ...
0
votes
0answers
4 views

How to deactivate sendfile() in Django runserver [migrated]

I am running a Django development environment using Vagrant/VirtualBox. I am using runserver for my local testing. However, I have encountered this bug: ...
1
vote
0answers
64 views

Nginx : How to set 'limit_conn' and 'limit_req'?

I'm using nginx version 1.6.2 on ubuntu 14.04 I've tried to input limit_conn and limit_req at configuration file with referencing nginx documentation. Nginx is well working without limit_conn and ...
0
votes
1answer
32 views

Nginx ngx_http_access_module deny being trumped by redirect

When I put a deny in the http context, a server -> location context is still executing its redirect. Given this very basic nginx.conf: events { worker_connections 1024; } http { deny ...
2
votes
1answer
48 views

Nginx cache not updating

So my coworker set us up a fancy new caching proxy system and then promptly went on vacation. Now I'm getting complaints from our developers/designers that many static resources are being cached for ...
2
votes
1answer
32 views

Nginx doesn't decrement max-age

I'm trying to set up Nginx as a reverse proxy for my Rails application running on Unicorn. My app has some public pages that I'd like to cache for a duration for 60 minutes, so I set the max-age ...
1
vote
1answer
31 views

nginx - no ssl for crawlers / bots

In a server directive for port 80 in nginx I want to redirect all requests to https if the user agent is not a bot. I tried using this: ... location / { if ($http_user_agent !~* ...
-3
votes
0answers
18 views

Nginx http authentication with python

I have following Apache configuration (excerpt): <Location /api> AuthType Basic AuthName "Top Secret" AuthBasicProvider wsgi ...
0
votes
1answer
28 views

Block a unique hash in URL through NGINX

I need to block a hash which is inside a URL through nginx. The URL which requires to be blocked is ht tp:/ /mp3s tri ng.c ...
0
votes
1answer
22 views

Nginx Load Balancer having two load balanced nginx+php-fpm (Primary script unknown) error

We have two web servers with nginx+php-fpm ( 10.0.0.10 and 10.0.0.20 ), which is load balanced behind another nginx server ( just nginx ), when we try to browse we get file not found error, with error ...
0
votes
3answers
30 views

NGINX Not showing my index.html - Stays default

server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /var/www/apexnetwork.org/public_html/; index index.html index.htm; # Make site accessible from ...
0
votes
1answer
46 views

nginx logs to syslog - connection refused

I'm trying to setup nginx 1.7.3 to send logs to syslog, but when I this configuration: server { access_log syslog:server=localhost; } this shows up in nginx's error log: 2015/01/15 21:42:47 ...
0
votes
2answers
37 views

Which directories does nginx need access to?

I'm writing a systemd service file for nginx and an internet facing service running as root is a bad idea, however I need nginx to access a certain directory in each user's home directory. e.g. ...
0
votes
0answers
53 views

Jenkins publish over ssh success to connect the server but failed put file

I have a problem that when I do build to my job, its cannot put my file on the server directory in console output i get the message "ERROR: Exception when publishing, exception message [Permission ...
0
votes
2answers
34 views

nginx with php5-fpm and multiple Wordpress in subdirectories

I have a running nginx server with php5-fpm on a debian wheezy. I want /var/www/devel/ to be my development folder served at http://devel.example.com. In this directory I have multiple projects like ...
0
votes
1answer
63 views

Nginx Pagespeed does not Combine or Minify JS or CSS

I am using Mod_Pagespeed Filters for Nginx and the combine and minify javascipt or css is not working. I checked everything and could not find the reason: 1) There are no errors in the error log 2) ...
0
votes
0answers
52 views

Is it really possible to use PHP sessions for authentication with nginx fastcgi cache?

I have recently switched an opencart instance from Apache+mod_php to nginx+fastcgi+php-fpm. I have been trying to leverage caching for most pages through fastcgi-cache. Unfortunately, many users ...
2
votes
3answers
1k views

How to disallow external access to 127.0.0.1? [closed]

I use tcp socket on 127.0.0.1:9000 to connect nginx to php5-cgi. However I want make sure that no extrnal request can be made to this IP, so that no attacker can obfuscate IP and bypass nginx to do ...
0
votes
0answers
42 views

Keepalive best practices for Nginx-Haproxy-Apache chain

I am using Nginx to serve static content, and Haproxy to proxy requests to multiple Apache2 backends discovered via Zookeeper. Nginx -> Haproxy -> Apache2 According to the official Nginx website, it ...
0
votes
0answers
47 views

Configure nginx to proxy pass when some conditions occurs or to use php fastcgi otherwise

I have a particular case on which I want to redirect visitors to a "prerender" server when I found out the visitor is a crawler (to give a SEO-optimised website) and to a standard php fast-cgi ...