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

dynamic sub-domains: advice needed (debian 8 running NGINX)

I need your advice regarding architecture. Say I have a domain mydomain.com I'd like to have dynamic sub-domains: *.mydomain.com I will need anything that's not www.mydomain.com to be routed to a ...
6
votes
2answers
61 views

Does Nginx `if_modified_since` only work on static resources?

I can't seem to find enough documentation. I have an app that generates some dynamic responses, but could still benefit from the Last-Modified header -- so I send it. However, turning on ...
1
vote
0answers
23 views

nginx: Use geo module with allow/deny directives

Reading nginx's ngx_http_access_module's documentation, I came across this: In case of a lot of rules, the use of the ngx_http_geo_module module variables is preferable. How can I use allow/deny ...
1
vote
0answers
58 views

Varnish keeps getting MISS when Nginx is backend server

I am experiencing a really weird situation where Varnish works fine with hitting directly to application server (Play server), but not working with Nginx as web sever. Working: Varnish:6081 => ...
1
vote
1answer
53 views

FastCGI cache is always a MISS

So, I've setup FastCGI cache like this: location ~ \.php(/.*)?$ { fastcgi_cache RWI; fastcgi_cache_valid 200 60m; set $nocache 0; if ($request_method = POST) { set ...
0
votes
1answer
32 views

Nginx SSL cant connect to site

I just bought a SSL certicate for my website and tried to get it working with my nginx install, but uppon connection the browser refuses the connection with the website. Here is the relevant part of ...
0
votes
0answers
15 views

nginx sends 404 instead of waiting for fastcgi

Our nginx is configured to send thumbnails from a folder. If they don't exist, nginx has to pass the request to fastcgi to generate the thumbnail and send it to the user. If the requested doesn't ...
1
vote
1answer
16 views

Redirection with subdirectories urls in Nginx

When with my browser, I do a call to http://myhost/tiles/yellow/1/2/3.png, I would expect to get content from http://myhost/cache/yellow.png My configuration is the following location /cache/ { ...
10
votes
3answers
213 views

How to make redundant load balancers?

I understand that the purpose of load balancers is to balance load between your servers and keep track of instance health, etc. But what if load balancer itself fails? How do you set up redundant load ...
3
votes
0answers
50 views

Protect Piwik on Nginx with basic authentication, but allow access piwik.js

I got nginx running on my server and recently installed Piwik with this config: server { listen 443 ssl spdy; server_name analytics.example.org; root /srv/www/analytics.example.org; index ...
-3
votes
0answers
48 views

error 404 new installation of wordpres in localhost with nginx hhvm

I have problems with wordpress and nginx on localhost. The phpinfo test runs within the default folder nginx user,,,, When I try to install wordpres says, error 404 If I make a test page ...
0
votes
1answer
19 views

Nginx refuses to read new directory in /home

I'm on CentOS6.6, installed "Akeneo" and all went well. Installed into /home/pim so the actual location for nginx to use is the web directory where app.php is located. Doing a namei on ...
1
vote
0answers
51 views

Change Nginx document root from /usr/share/nginx to /etc/nginx

I've tried many things, STFW, RTFM but I still have this problem. The thing is: I have a Nnginx installed in an AWS machine (other fella installed it, not me) and I MUST serve several virtual hosts ...
0
votes
1answer
28 views

Two differents directories with Nginx

I have two directories on my server, the directory1 with others directories inside, and the directory2 with a single file index.php. I want to access to my index.php with http://server/ ...
-1
votes
0answers
22 views

Nginx ip_hash load balancer and external auth via SAML2

We are trying to make work a system, consisting of two application hosts and one nginx load balancer before them with ip_hash balancing method enabled. The problem is that we need to use an external ...
2
votes
1answer
45 views

configuring ssl on nginx - is this ciphers list up to date?

I have bought a certificate from Comodo and I'm following an article on their site on how to configure the certificate on my nginx. The question is, is this configuration, mainly the ciphers list, up ...
0
votes
0answers
56 views

Nginx TCP Fast Open Issue

I have configured Nginx and Apache on one of my servers. The nginx server listens on port 80 and Apache on port 81. Nginx works as a reverse proxy. In nginx I configured TCP Fast Open: server { ...
0
votes
1answer
23 views

Unable to open JPEG files with Nginx

I am serving a static page with assets. Unfortunately i am not able to open images, whereas JS and CSS files are going through quite fine. I simply receive 403 (Forbidden) when trying attempting to ...
1
vote
1answer
39 views

No Input File Specified with Nested Docroot

I have the following nginx config for 2 different domains: server { listen 80; root /srv/users/serverpilot/apps/myapp/public; index index.php index.html index.htm; server_name ...
0
votes
0answers
29 views

Nginx extensionless PHP rewrite not working

I have been trying to rewrite my php pages so that they display without their extensions in the browser. For example, a link on my server at www.example.com loads a page called about-us.php and in the ...
1
vote
0answers
24 views

nginx rewrite with php interpreter [closed]

First off, Im new to nginx, I'm switching from apache. I setup a server using the ajenti control panel. I got php working just fine. however when I try to do a rewrite rule I get some strange ...
0
votes
0answers
59 views

Nginx Varnish 4.0 SSL Wordpress configuration redirects mydomain.tld to https://127.0.0.1

I have the following stack: (redirect http to https =>) https nginx -> varnish -> nginx http -> php5-fpm When I open my.url.com I get instantly redirected to https://127.0.0.1 Without varnish, ...
0
votes
1answer
45 views

nginx Browser Caching does not work

I have the following problem. I'm using a nginx server. To serve my images correctly I've added following location rule: location /images/ { alias /srv/mysite/images/; autoindex off; } ...
2
votes
0answers
17 views

nginx error log :r eturned busy again while sending response to client,

I got lots of errors in my nginx errorlog as following: 2015/04/28 20:05:32 [alert] 67449#0: *29938935 sendfile(/var/www/images/201504/13/210123jpt6cpjj6r1g2upt.jpg) returned busy again while sending ...
2
votes
0answers
50 views

Init script has permissions issues, but running with /bin/sh resolves them? [closed]

Can someone tell me what's going on here? As far as I knew, these ways of executing an init script are identical. box:~# whoami root box:~# /etc/init.d/nginx restart nginx: [emerg] open() ...
0
votes
1answer
15 views

Nginx subdomain issue nginx tries to get files from the subdomain's parent httpdocs

I am trying to make a subdomain (for the purposes of this question: grace.myexample.com) using nginx. The configuration is as follows: server { listen 10.10.185.163:80; server_name ...
1
vote
0answers
29 views

Nginx, reverse proxy and caching only some of the routes

I have a RESTful API running in the UK but somehow it's so slow for AU users. So what I would like to do, put an nginx proxy on a AU server and cache some of the routes for 1, 10 and 60 mins and don't ...
1
vote
1answer
23 views

How to restrict nginx server to a single ip on a multi ip server

I have multiple websites running under a server with two IPs. How do I configure nginx to listen at just one ip? For example: IP: 192.168.10.10 with nginx (multidomain) IP: 192.168.10.11 - etc... ...
2
votes
0answers
40 views

nginx, separate robot access log and human access log

I'm trying to separate the robot access log and human access log, so I'm using below configuration: http { .... map $http_user_agent $ifbot { default 0; "~*rogerbot" 3; ...
1
vote
0answers
114 views

How to configure HHVM with Nginx compiled from source?

I installed Nginx 1.8 (compiled from source) on Debian 7: cd /opt/ sudo wget http://nginx.org/download/nginx-1.8.0.tar.gz sudo wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz sudo tar ...
1
vote
1answer
80 views

nginx: How to log TLS error (if unsupported ciphers / protocol)

I'm in the progress of switching to 100% https. Server is running nginx+libressl. Before going https:100% I'm interested in seeing which clients would no longer be able to connect to my site. E.g. ...
0
votes
1answer
44 views

Why this nginx rewrite rule add trailing slash?

I've the following rewrite rule on location /, and it enforces trailing slash! location / { rewrite ^(\/.*) https://example.com/ar$1 permanent; } each, time I curl mydomain.com, I got the ...
0
votes
0answers
26 views

lighttpd: Translate nginx try_files to lighttpd

I'm struggling while translating the following nginx rule to lighttpd: try_files $1 $uri $uri/ /abcdefg/index.php$is_args$args; Can someone explain me, how this would look like in lighttpd? Thank ...
0
votes
0answers
37 views

wsgi nginx error: permission denied while connecting to upstream

There seem to be a few questions on stackoverflow and serverfault about this but unfortunately nothing has worked for me. I'm getting a 502 bad gateway on nginx, and the following on the logs: ...
0
votes
0answers
26 views

Is it good or bad to have dynamic virtual hosts configuration in Nginx?

I have a dozen sub-domains hosted in a single server using Nginx. Currently I am using a single configuration like this: server { listen 80; server_name *.example.com; root ...
0
votes
1answer
50 views

Best way to manage multiple domain with SSL in single droplet?

Firts of sorry about my poor english, but I'll do my best. Currently I manage 2 domain on my $5 DigitalOcean droplet and have use Cloudflare as my DNS manager with Flexible SSL configuration, ...
0
votes
1answer
26 views

Nginx forward ssl to ISPConfig lxc container

I am having issues with https connexions to the ISPConfig admin panel (port 8080). My setup is relatively standard. I own a physical host, which routes all traffic on common ports to an LXC container ...
0
votes
2answers
41 views

Nginx & PHP-FPM: Query parameters won't be passed to PHP

I am currently setting up a machine for local development using Vagrant. Everything runs as it should, expect query parameters aren't passed to PHP on subpages. That means on www.example.com/?a=b, ...
0
votes
0answers
122 views

nginx + fastcgiwrap = 502 Bad Gateway

I'm trying to execute a cgi script on my web server. I'm running Debian 7.8 (wheezy), with nginx 1.8.0 and fastcgiwrap 1.0.3-3 (both installed via aptitude). Here are my nginx settings (taken from ...
0
votes
0answers
20 views

How to redirect all http traffic to https [duplicate]

I am using nginx and would like all http traffic to become https using nginx. can someone post an example for nginx config file? Here is mine. it's not working and i don't have a lot of nginx ...
0
votes
0answers
23 views

Nginx proxy rewrite to a different host

I've been banging my head against the wall trying to get this working. I'm hoping someone can point me in the right direction. I am trying to use Nginx to reverse proxy to a set of servers in a ...
1
vote
1answer
23 views

Nginx alias with trailing slashes

I have a sub-site working under a parent website like this: http://example.org/sub-site (http://example.org/sub-site/ works too) Everything seemed to work well, including : ./sub-site/sub-section ...
0
votes
1answer
25 views

PhalconPHP and AngularJS on Nginx

I am trying to run a combination of PhalconPHP and AngularJS of a Nginx webserver with the following file structure: /root /api index.php index.html PhalconPHP is located in the API folder ...
0
votes
0answers
26 views

How do I start nginx (+ passenger) with an RVM system-wide install on nginx?

My nginx installation was working with an RVM installation for single-user, but when I switched the RVM installation to a multi-user (system-wide) installation, /etc/init.d/nginx start gives a ...
0
votes
0answers
67 views

nginx - Allow any http-traffic that is not x-forwarded-for

In my nginx configuration, only a few whitelisted IPs are allowed (based on x-forwarded-for header), and rest all are blocked via deny all rule. Since nginx is running behind an AWS load balancer, I ...
0
votes
0answers
68 views

ModSecurity + Nginx “SecRule” startup error

I've installed Nginx (1.8.0) + ModSecurity (2.9.0) from source on OpenBSD (5.6), without problems. But when I try to configure modsecurity with the default config, upon starting nginx I get: ...
0
votes
0answers
28 views

Handle redirects on proxied server

Hi I'm trying to make mirror for website.ru at website.com It should display website.com in browser and proxy_pass all traffic to website.ru. Here is my config: server { listen 443; ...
1
vote
2answers
35 views

nginx log when specific referrer is present

Because someone steals content from our website, I need to create additional log file, that logs only if http_referrer contains specific domain. Currently I have this: if ($http_referer ~* ...
1
vote
2answers
30 views

Nginx only responding to two virtual server definitions out of three?

I have a rather confusing problem that only affects one of my three nginx reverse proxy servers. I have defined a conf file with three virtual servers like so: # Django upstream tickets { ...
0
votes
1answer
163 views

How to proxy /grafana with nginx?

I've setup and started default grafana and it works as expected on http://localhost:3000. I'm trying to proxy it with nginx where I have ssl installed. I'm trying to have it respond to ...