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

Nginx - block referrer to certain directory

I'm trying to return 403 on a referrer, but only if they've tried to access a certain directory So far I've tried: location ~* /dir/.*. { if ($http_referer ~* (domain) ) { return 403; } ...
1
vote
1answer
16 views

Match … character in rewrite rule with nginx

I have a problem, where someone has added a link to our site - but its getting cut off. I'm seeing in the log file, as: /info-cry%E2%80%A6 Seeing as I know what that is mean't to be going to, I'm ...
0
votes
0answers
16 views

nginx module to send a message when a server is down

I'm using nginx as a load balancer for few http servers (nodejs mostly). I was wondering if anyone here knows a module (or a way) for nginx to inform (preferably http/s but email is also ok) that one ...
0
votes
0answers
12 views

Docker volume issue

If I'm running a Docker Nginx container with this command, it works: docker run \ ... -v /etc/nginx/sites-enabled/mysite.conf:/etc/nginx/sites-enabled/mysite.conf:ro \ ... ...
-1
votes
1answer
13 views

How to allocate bandwidth for specific process

I have nginx php server with Debian OS on my production VPS , the problem is that nginx eats all of my bandwidth. When I try to upload something using ftp, the connection times out most of the times. ...
0
votes
1answer
9 views

Nginx load balancer shows wrong site on failover server

I have five websites and I have three servers, all running nginx. Primary server Load balancer Failover server Each website has it's own primary server but they all share the same failover ...
0
votes
1answer
18 views

NGINX + SSL certificate securing the connection in some browsers only

I've been strugling with this issue and I seem to be running into a dead end here without knowing what to do next... I've taken a task left by another worker who left on vacation. He was trying to ...
0
votes
1answer
10 views

Docker volume not working with Nginx

I've created a simple Docker container with Nginx inside and for some reason, it won't access the www volume data from the host. Here is the command I used: docker run \ -d \ -p 8080:80 \ ...
1
vote
0answers
15 views

Nginx can't speak with uwsgi (prematurely closed connection)

What I'm missing in my nginx/uwsgi/php-embed configuration? rpm -qa|grep php php-cli-5.4.16-36.el7_1.x86_64 php-xml-5.4.16-36.el7_1.x86_64 php-devel-5.4.16-36.el7_1.x86_64 ...
-1
votes
0answers
11 views

No logging - 502 Bad Gateway

I'm trying to deploay a Django app using Gunicorn. Problem is that my 502 error is not being logged, and the access log is also not updated. Here is my conf file: user root root; events { ...
0
votes
0answers
21 views

add user for ssh and accept uplaod file , nginx + centos

I just install nginx on CentOS 6.5 try to move all old project write in php and NodeJS, from Apache to this. goal: website admin upload folder and file through ssh accept user upload file in ...
0
votes
0answers
11 views

cached response always buffered on disk nginx

I'm using nginx as reverse proxy, and it also use cache (proxy_cache) and buffering (proxy_buffering) at the same time. I've set proxy_buffers to really high value (proxy_buffers 256 64k;) but nginx ...
-4
votes
0answers
13 views

LEMP Setup on CentOS at DigitalOcean [on hold]

I'm following this tutorial. I got some issues start from step four: Configure Nginx to Process PHP Pages. After I typed this $ sudo vi /etc/nginx/conf.d/default.conf. I can't find server { listen ...
-2
votes
0answers
14 views

how to make php scripts executable instead of downloadable using nginx

Recently I set up a virtual machine through vagrant and I'm using nginx as a web server. The OS I'm using for the VM is Ubuntu Linux 12.04. The problem is that any script I write in PHP gets ...
0
votes
0answers
7 views

nginx naxsi $URL_X doesn't work

Recently recompiled my NGINX with a NAXSI module. Now setting up the white lists but the $URL_X functionality doesn't seem to work at all. Generating Incorrect line BasicRule wl:1312 in NGINX ...
1
vote
0answers
19 views

404 when serving static files with docker+nginx+django/angularjs

I'm following the configuration given at this repository. I decided to keep my docker configuration and actual code in separate repositories - I'd clone the code repo using the Dockerfile. I'm using a ...
0
votes
0answers
12 views

How to implement multi-server user file uploads set up? (nginx + django) [on hold]

I'd like to build two-server configuration, one is django app server, and the other is file storing\processing server. I'd like to save files uploaded by users directly to the file server. I've ...
-1
votes
0answers
12 views

How configure rights for nginx access_log file?

I want to allow owners of site to clear log files but nginx create log files with "0644 root:root" permitions. Can I change this behaviour? UPD The nginx server runs under rights of this user. Also ...
-1
votes
0answers
8 views

where is naxsi api documentations? [on hold]

there is over 10 python files under naxsi (nginx WAF) api folder that supposed to be tools for generating white lists, but there is no documentation for setting up these tools is there anybody who ...
0
votes
0answers
12 views

nginx http -> https redirect adding extra comma with the host name

I have a server that should always serve https and I try to make nginx automatically redirect from http to https. reading other questions on this subject here, I wrote the following config: server { ...
0
votes
1answer
17 views

Serving my index.html file directly from nginx in socketio proxy

My current nginx.conf file looks like this. upstream socket_nodes { ip_hash; server 127.0.0.1:8080; server 127.0.0.1:8080; server 127.0.0.1:8080; server 127.0.0.1:8080; } server ...
1
vote
1answer
15 views

Can't start nginx: “code=exited, status=1/FAILURE”

I've just installed nginx on Debian Jessie, and I can't start it: $ sudo /etc/init.d/nginx start [....] Starting nginx (via systemctl): nginx.serviceJob for nginx.service failed. See 'systemctl ...
0
votes
1answer
13 views

Rewrite subdomains in Nginx

Because I don't want to use CDN anymore I would like to rewrite cdn.example.com to www.example.com. How to do this with Nginx? There is only www.example.com in my server block.
0
votes
2answers
24 views

Is it necessary to use nginx server to use with tomcat

Is it necessary to install nginx server before using apache tomcat. Can we use only apache tomcat is there any pros cons which choice is better and why. I am using fedora 22 for deploying my ...
0
votes
0answers
32 views

NGINX: rewrite, proxy and cache a folder

I am new to NGINX and need to know how to do this in a special location (folder) remove all query parameters proxy request to another server cache the result locally for x minutes Config snippet: ...
1
vote
1answer
18 views

Nginx confing to github pages and home page

I am trying to configure Nginx to use a domain like proxy pass to github pages, and also to have a landing page on the root domain. With this configuration the proxy to githubpages work fine, but if ...
-7
votes
2answers
48 views

How to secure server when the root password is changed [on hold]

I have a server now and I do a web application for my customer, I have the server credentials, what if my customer changes the server credentials after I have completed the application, I don't get ...
-2
votes
3answers
41 views

Not able to find /etc/nginx/sites-enabled/default [on hold]

I have installed Nginx server at my cloud space checked by ip it is showing proper page. Now I have also a apache Tomcat8 on port 8080 I want to redirect my port 80 traffic to 8080 for that I am ...
0
votes
2answers
27 views

NGINX rewrite 2 adresses to same destination

I am looking to rewrite 2 different addresses to the same destination address. Is it possible to do something like this? location = /foo/bar/, /to/fu/ { return 301 /re/bar/; } Or do I have to ...
0
votes
0answers
14 views

Nginx, SSL and websockets on different port

I user Nginx as a server proxy and use it with SSL connections for whole website. All is fine, except I do not know how I can add for this websockets. I found some info on internet and with it ...
0
votes
0answers
10 views

Nginx doesn't start Passenger/Nodejs

I cannot get Passenger to start my Nodejs (iojs) application on restarting nginx. I've followed the tutorials and installed the prerequisites: $ nginx -V nginx version: nginx/1.8.0 configure ...
0
votes
0answers
24 views

Looking for error log in Nginx

When I try to sign up a user on my site I get a 500 error. On my local machine I can at least see what the error is, but in production I cannot. My controller returns a 422 error when a sign up is not ...
0
votes
0answers
18 views

Nginx rewrites working on local virtual machine but doesn't work on live server

I have an nginx configuration on a vagrant VM, where the site is running Joomla. This runs fine with no issues. The issue is with nginx on the live site, running the same version as on the VM - 1.8.0. ...
0
votes
0answers
8 views

How can I configure Varnish (and Nginx, if possible) to use a dynamic cache key?

Some of my clients use Varnish for caching on their sites, while others rely on Nginx. Due to the fact that their sites must be highly dynamic, yet quick to load, I need to configure both systems ...
0
votes
0answers
9 views

nginx http digest + proxy doesn't work on /something?x=3?

Here's my nginx.conf: worker_processes 1; events { worker_connections 1024; } daemon off; http { error_log stderr debug; keepalive_timeout 65; gzip on; server { ...
-2
votes
1answer
23 views

How to Specify which URLs have HTTP Authentication with NGINX

In my nginx configuration file I have successfully created HTTP Authentication for the whole website while it's under development. root /var/www/staging/; auth_basic "Restricted website - authorised ...
0
votes
1answer
6 views

nginx with unicron add https to nginx and redirect https default

Below I have added my nginx.conf file , how to add https to this nginx server and redirect to https by default. I have my crt and key files in /home/ubuntu/ssl/ folder worker_processes 1; user ...
1
vote
2answers
45 views

How to replace the host variable in a header in nginx

I am trying to replace the host variable in the header in nginx configuration, such that some.random.sub.example.net becomes net-some.random.sub.example.com. i have tried the following : if ($host ~* ...
0
votes
1answer
14 views

nginx reformat request_uri to access real file path

I want serve static files with nginx. User will request like this format: http://test.com/files/ea624cf923ea Actual file location will like this /files/ea/62/4c/f923ea How can I serve this ...
0
votes
0answers
6 views

nginx rewrite rules for language

the effect I want: abc.com/hello => abc.com/article.php?link=hello abc.com/en/ => abc.com/index.php?lang=en abc.com/en/hello => abc.com/article.php?link=hello&lang=en what I did: ...
3
votes
2answers
41 views

Nginx, log referrers from certain domain to separate log file

I have my nginx setup to block certain referers like so: if ($http_referer ~* (site_name) ) { return 403; } This works fine, however I'd like to also log the blocked referrer to a separate file. ...
-2
votes
0answers
29 views

Deny access to a folder but allow access to every subfolder

I need to deny access to / but allow access to every folder after. e.g. browsing / would give you a 403 but going to /dir1/ would let you through. There's loads of folders being added so I can't ...
1
vote
2answers
38 views

HAProxy - Health check of multiple microservices for one server

We have 2 web servers that we want to load balance. Each server has a main web application that is hit by the public. Each server also has number of dependent microservices that are used internally by ...
0
votes
0answers
15 views

nginx reverse proxy hide login query also on 301 redirect or full qualified url

I am spending now over two days on that issue, trying several servers (apache, now nginx), searching the whole web, but had no luck so far. First: sorry for posting my urls with http-s instead of ...
-1
votes
0answers
10 views

Nginx aliasing to remove directory name from url

I have a url like http://dev.com/mag/test01. The folder structure goes like /root/pub/mag/test01. I want to remove that pub folder name from the url so, i have my config as below: location /mag/ { ...
0
votes
0answers
34 views

recv not ready (11: Resource temporarily unavailable)) (nginx/1.1.19, supervisorctl, gunicorn )

I have site on Ubuntu 12.04.5 LTS, django (supervisorctl, gunicorn). It work 1 year without problems, but today my zabbix server sending me messages about alerts (every 3-7 minutes) about timeout (for ...
0
votes
1answer
29 views

nginx and apache - multiple virtual hosts on the same IP - correct configuration

I am trying to run nginx as reverse proxy for Apache on the same machine and serve different websites from it. My question is - is it possible to add virtual hosts only to nginx and have it pass the ...
0
votes
0answers
16 views

Nginx log says cannot connect to upstream server, but it does anyway

I've read much about this problem and have tried many things, but I cannot prevent this error from flooding the nginx error log. What I don't understand is that whatever the resource is that can't be ...
1
vote
0answers
9 views

Piwik + uWSGI setup

I have a problem setting up uWSGI+piwik using nginx. My configuration follows this blog entry. My uwsgi ini file looks like this [uwsgi] plugins = php chown-socket = www-data:www-data uid = piwik gid ...
1
vote
2answers
44 views

High inbound and outbound network traffic

Over the last day or so, one of instances has had a large amount of bandwidth consumed. This means that we have nearly exceeded our allowance (roughly the same amount inbound and outbound). Looking ...