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
26 views

Trying to get nginx to return 301, preserving $_GET

I'm having trouble configuring nginx to return the url I want. I'd like http://domain.com/blah?abc=e9800ecf8 to return http://domain.com/createpage.php?abc=e9800ecf8, i.e. it preserves the abc ...
1
vote
1answer
39 views

nginx regex location not matching

I have the below location below, which is among a larger conf file. As reference, this works: location = /scripts/news/admin/index.js { alias /my/file/path/news/scripts/admin/index.js; } ...
0
votes
0answers
68 views

How to run 2 fast-cgi (php-fpm) websites on an nginx server?

I have nginx running with a few vhosts for different domains. One of them uses php-fpm. I need to add another vhost(for a new domain) that points to a new directory and that also has to use php-fpm. I ...
2
votes
1answer
108 views

Wordpress converting http to https on Nginx + HHVM

I am trying to run Wordpress on Nginx + HVVM. It runs fine on Apache + PHP, but when I activate Nginx, most of the urls in the website get rewritten to https. Here is my website config: server { ...
0
votes
1answer
74 views

Specific directory is forbidden

I'm using reverse proxy on my Ruby app- 2 to be exact - and the first instance which is located in "/var/www/cuba" works, but when I have a sub-domain to run another instance, I get this error(from ...
0
votes
1answer
46 views

Nginx redirects not getting used

I have an nginx.conf file that looks something like this: http { server { listen 80; server_name myapp.org; return 301 http://www.myapp.org$request_uri; } server { ...
-2
votes
1answer
38 views

Could nginx mail module replace a Postfix/Dovecot combo

I saw that nginx has a "Mail Module". I googled but don't find much documentation about this. What is this ? For what can it be used ? Could it replace my current simple Postfix/Dovecot combo?
0
votes
1answer
23 views

gunicorn call fails every 6th time

i have a bottle app that has an endpoint that gets a timeout every 5th or 6th time i hit it (in my case, i just refresh every second to replicate) when it works successfully, it takes ~ 150ms to load ...
0
votes
0answers
49 views

WordPress can't move files (Nginx, HHVM)

I have a WordPress setup using HHVM & NGINX on Ubuntu 14.04 that can't moves files when uploaded. Nginx is running as www-data. Files are all owned by deploy:deploy. Where www-data is a member ...
0
votes
0answers
45 views

nginx config - pass all to https apart from one folder [duplicate]

I've been banging my head on this for 3 days day and I'm getting nowhere. I transferred the whole site over to ssl and that change over didn't go too bad and the site was only down for about 30 min. ...
0
votes
1answer
50 views

Nginx: How to exclude a URL with a query parameter from htpasswd authorization

A wordpress site has its /wp-login.php protected with HTTP authorization using htpasswd. Web server is Nginx. Config for the same is given below. A URL associated with a plugin uses ...
0
votes
1answer
60 views

Nginx Thin.Sock not found error [closed]

Cluster of 3 files (err.log,chat.yml,chat.conf for Nginx) : err.log : 2015/03/19 15:05:50 [crit] 1535#0: *79 connect() to unix:/var/www/chat/public/tmp/sockets/thin.0.sock failed (2: No such file or ...
0
votes
0answers
30 views

Can't Get Virtual Subdirectory Locations Working in Nginx

I have my webapps each as toplevel directories under /var/www, and ideally need to stay that way.. only one hostname (_), no vhosts, so I want "/" to point to my /var/www/mainsite/, and then I want ...
-2
votes
1answer
67 views

Facebook error parsing input URL error 502 Bad Gateway

Any time when someone shares my website link onto facebook or twitter they get 502 Bad Gate way. I check the nginx error log to see whats going on and I got this. error1615#0: *2375 connect() failed ...
0
votes
1answer
84 views

nginx: upstream not working

I'm having a problem with my upstream. I'm getting back the url http://backend/f?p=4550 with a 404 error when I pass https://secure.toto02.com/ords/pls/manitou/4550. What I'm trying to do is keep ...
0
votes
1answer
45 views

SSL Certificates from nginx only works in Windows IE and Chrome

I have a wildcard certificate and got it signed by AlphaSSL. I followed the steps from here: http://nginx.org/en/docs/http/configuring_https_servers.html#chains to set it up on my nginx server which ...
1
vote
1answer
29 views

Adding Curly Braces to Map block in nginx

I am having a problem trying to get the following configuration to work. Every time I run the config test I get a failed pass. To start off let me show you a working configuration location / { ...
2
votes
2answers
169 views

Can I use nginx environment variables within static files that nginx serves?

If I use a environment variable in the nginx config, and nginx is configured to serve only static files (html,js,css - e.g. a AngularJs app), is there any way I can use the environment variable within ...
2
votes
1answer
73 views

logging SSLv3-handshaking failure on nginx

I have website server by Nginx in FreeBSD. Last week we decided to drop support for SSLv3 connection for our site. However I wondering if nginx has logs of all client who can't do SSL-handshake ...
1
vote
0answers
40 views

nginx: Redirection from http://*.example.com to https://example.com showing strange behaviour

I have an SSL certificate being only valid for example.com (not valid for subdomains) and therefore want to redirect both http://example.com and http://www.example.com to https://example.com using ...
0
votes
0answers
87 views

Nginx and passenger request timeout (nginx status code 499)

DISCLAIMER: I have read numerous posts here, on stackoverflow and other pages and I could not come up with a solution, so hopefully this helps. We are running a Rails App on Passenger together with ...
1
vote
1answer
410 views

Nginx + HHVM + MariaDB + WordPress install -> Error establishing a database connection

I'm setting up a VPS for a WordPress blog. I'm using Ubuntu 14.04 LTS 64 bits and then I've installed Nginx 1.7.8, HHVM 3.6.0, MariaDB (don't remember the version). Finally I've downloaded WordPress ...
3
votes
1answer
32 views

nginx locations and precedence (deny ignored for *.php)

I'm a somewhat experienced Apache admin in a past life, but I've decided to take the plunge and learn nginx. So far everything seems fairly intuitive, but it's clear that I haven't quite internalized ...
0
votes
1answer
44 views

Nginx Test Successful but I cant Restart

nginx: [warn] conflicting server name "lolnews.com.br" on 0.0.0.0:80, ignored nginx: [warn] conflicting server name "lolnews.com.br" on 0.0.0.0:80, ignored nginx: the configuration file ...
-1
votes
1answer
43 views

Nginx “”server“ directive is not allowed”

I recived this message root@lolnews2:/etc/nginx/sites-enabled# nginx -t nginx: [emerg] "server" directive is not allowed here in /etc/nginx/sites-enabled/lolnews.com.br:57 this is my conf server ...
1
vote
1answer
72 views

uwsgi configuration with Nginx, with python scripts as cgi - 502 Bad Gateway

This is my .ini file to run the uwsgi "pyApp.py" [uwsgi] plugins = cgi socket = 127.0.0.1:9010 cgi = /=/usr/share/test/ cgi-allowed-ext = .py cgi-helper = .py=python i have a file "firstapp.py" at ...
0
votes
1answer
53 views

nginx: regex not working on url rewrite

I have http://sample.cervo02.com. i'm trying to get https://cervo02.com/sample. I tried couple of redirect none of them are working. rewrite ^([^.]*)$ https://cervo02.com/$1 last; return ...
0
votes
1answer
63 views

Where is the bottleneck - nginx slow file serve

I have nginx 1.6.2, on Ubuntu 14+. I host a couple of "big" files - from 20mb to 60mb - which are constantly accessed (it could be more then 1000 connections simultaneously at evening peaks). They ...
0
votes
0answers
73 views

nginx proxy_pass to tomcat webapp

I want to configure nginx as a reverse proxy for different webapps hosted on a tomcat. Basically, all requests to http://localhost:80/A/some/other/params (nginx is running on port 80) should be ...
0
votes
1answer
37 views

nginx location match issue auth_basic

I have this configuration : location / { root /etc/nginx/euchet; } location /app/ { proxy_pass http://172.16.184.2:8080; proxy_redirect off; proxy_set_header Host $host; ...
-1
votes
1answer
16 views

Running Rails Application as root user on nginx [closed]

My application(running on nginx) is unable to ssh into a remote machine, reason being that the client has has given ssh rights only to the root user on their server. While debugging this issue, I ran ...
6
votes
1answer
180 views

Does nginx allow an upstream server to respond to and close a request before it has finished?

I have an image upload service that nginx proxies requests to. Everything works great. Sometimes though, the server already has the image the user is uploading. So, I want to respond early and ...
1
vote
2answers
65 views

is it normal for NGINX to accumulate connections in writing state?

This is a graph showing connection count from nginx's stab_status, the drops in graph are server restarts done manually. I find this behaviour strange, looks like some leakage. I think there are ...
2
votes
1answer
78 views

Need recommendations on Firewalled DMZ design for PHP web server on Linux

The 3 options we are considering are listed below. Which one is best or is there a better solution we didn't consider. All servers are linux with nginx. Do you see anything particularly wrong with ...
5
votes
1answer
162 views

How to serve specific static files with nginx?

I have queries like /api/lang?lang=en which I want to serve with nginx as /server/i18n-angular/en.json. How can I do that? I have the following directory structure: /public/ ...
0
votes
1answer
30 views

Is it possible to use parameters for nginx configuration files?

I am working on a web application that will be deployed in a few environments (production, staging, dev, demo). In all of these environments I want to use nginx as a proxy. This means that nginx ...
0
votes
0answers
24 views

Nginx redirect all except wordpress backend to a different site

I have put a holding page on my site which is a different vhost on my server. I still want access to the wordpress backend but want the front end to be redirected to the new vhost. Would the ...
0
votes
2answers
34 views

Setting htaccess rule for nginx

Hi i m having issue while setting htaccess rule in nginx. My htaccess is : htaccess rules are: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* ...
-2
votes
1answer
40 views

Plone4 with Nginx - Links are opening in a new page

I have a Plone4 and Nginx working on the same server (CentOS6). Nginx is working fast but all links on the Plone site received a target="_blank" attribute. All the links are opening in a new window ...
0
votes
0answers
46 views

Nginx images are not properly served, but CSS/JavaScript is, no errors given

I am setting up a server serving purely static resources (HTML, CSS, JavaScript, fonts, images). I'm using Nginx with a minimal config. server { listen 80; server_name dev.example.se; ...
0
votes
2answers
37 views

Why arent these web pages getting processed by PHP?

I have created a fresh install of nginx and php5-fpm on an Ubuntu 14.04 server and made the changes shown below to get configuration working. When I browse to a directory containing an index.php or ...
1
vote
2answers
393 views

Nginx Make website inaccessible via IP

I've got my website set up to be accessible via example.com. If possible I want to prevent it from being accessed via its IP altogether or at least 301 redirect it to website. Is the former possible ...
-1
votes
1answer
128 views

Can't restart nginx, bind() failed (98: Address already in use)

I know this topic exists in various different forms, but I'm having trouble solving my problem. If I run service nginx restart, nginx fails with the following log: 2015/03/14 08:36:42 [emerg] 9400#0: ...
0
votes
1answer
43 views

Nginx: too many redirects trying to return a specific 404 image?

I'm using nginx v1.6.2 to serve both dynamic nodeJS and static file content for a web-based application. Within a certain location (that happens to be serving static png files only), I want any not ...
0
votes
1answer
52 views

nginx can't execute many requests

I have a question about nginx tune. I have an application which I want execute 200 times every second. I created bash file and used wget with bqO switch for execute. But it has a problem. When the ...
0
votes
1answer
48 views

How can solve this error in nginx logs?

nginx version: nginx/1.6.2 /usr/logs/nginx-error.log [ uest: "GET /server-status HTTP/1.1", host: "127.0.0.1" 2015/03/14 05:21:24 [error] 23068#0: *8616047 openat() ...
2
votes
0answers
137 views

Nginx as a load balancer. Frequent upstream timed out (110: Connection timed out) while connecting to upstream

I'm trying to use nginx on a centos 7 virtual machine as a load balancer to replace an aging Coyote Point hardware device. However in one of our webapps we're seeing frequent and continual upstream ...
0
votes
1answer
100 views

Configuration of Symfony2 + Nginx on CentOS6 not working

im stucked here about 2 days traying to figure out how to make this run, hope somebody could point what I'm doing wrong. Trying to run Symfony2 over Nginx-CentOS 6 with this configuration file. ...
1
vote
2answers
45 views

nginx reverse-proxying, no-downtime backend update

I have one tomcat instance serving requests and I have nginx as reverse-proxy for this tomcat instance. When I update my Java Application, it took around 10 seconds. But those 10 seconds site is down ...
2
votes
1answer
80 views

NGINX load balancing not working as expected

I have an ubuntu system working as a load balancer and the /etc/nginx/sites-available/default looks like this: http { upstream myapp1 { server 192.168.0.20:80; } server { ...