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

0
votes
1answer
20 views

NGINX - conditionally allow or deny IP

Is it possible to conditionally allow or deny IP in NGINX? This isn't allowed. if($example){ deny all; } if ($example2){ allow all; }
0
votes
1answer
42 views

Rewrite Rules nginx

I am trying to configure rewrite rules for my site running on nginx. If someone lands on the website, i want them to see contents of mysite.com/wordpress but the url shouldn't change, it should ...
0
votes
0answers
30 views

Sub Domain Not Working on Nginx server with Apache Handling PHP

I have a domain setup and it is working. However I cannot get any sub domains working. I am trying to setup a sub domain right now for phpmyadmin. I am using Nginx as a reverse proxy for Apache with ...
0
votes
1answer
49 views

Nginx is running on server but won't serve static files

I've installed nginx on a client's Digital Ocean Node.js Ubuntu 14.04 droplet with sudo apt-get install nginx however, I cannot access the server's static files from the web browser. Having installed ...
0
votes
1answer
34 views

How to do load balancing with nginx

I need to use server as load balancer and web server at the same time. Here is my nginx config for website: upstream load_balancer { least_conn; server localhost; #server ...
0
votes
0answers
22 views

NGINX doesn't start on CentOS 7 reboot (fail on try to bind ipv6 address)

I have installed nginx / 1.8.0 on my server (CentOS 7.1), but does not start automatically after restart due to this error: 2015/06/20 10:34:11 [emerg] 827#0: bind() to [ipv6-address-here]:80 failed ...
0
votes
0answers
14 views

Allow different file size upload per location?

I saw that you can specify the client_max_body_size based on the location, but I can't make it work. I followed the documentation on Nginx that explain the order of loaded locations, but it doesn't ...
0
votes
1answer
180 views

huge traffic from POST 123.249.24.233/POST_ip_port.php

222.186.129.5 - - [19/Jun/2015:16:56:28 +0000] "POST http://123.249.24.233/POST_ip_port.php HTTP/1.1" 301 184 "http://123.249.24.233/POST_ip_port.phpAccept: */*" "Mozi$ 222.186.30.111 - - ...
0
votes
0answers
12 views

Nginx alias, with query vars

0 down vote favorite I have a directory alias, with the next configuration location ^~ /sub-site { alias /usr/share/nginx/html/sub-site/public; try_files $uri $uri/ @sub-site; location ~* ...
-1
votes
0answers
33 views

NGINX SSL Reverse Proxy Cache Caching Content only for individual clients

We are having some trouble setting up NGINX as a reverse SSL proxy cache. We have successfully got everything working except the content caching feature. The caching feature works, and displays a ...
0
votes
0answers
6 views

Transparently recreate dependency Docker container

I have usual setup with Java web server and an Nginx as a reverse proxy each in it's own container. In Nginx I have configured a fallback page that is shown to users when backend (web server) is not ...
1
vote
1answer
21 views

Install mysql-php5 to specific php file

I'm running an Ubuntu OS 14.04 hosting Nginx with Zend Server and Apache listening on separate ports. I managed to install Zend Server without any hassle. In an attempt to run Apache beside Nginx, ...
0
votes
2answers
28 views

Redirect wildcard subdomains

I'm new to nginx and just looking for some advice/help. I've got two domains, the original domain oldsite.com and the new domain newsite.com. I'd like to setup a 301 redirect from *.oldsite.com -> ...
1
vote
2answers
51 views

Keeping mutliple Linux instances up to date

I am running a Linux VM in Azure (nginx). I want to add multiple instances so that it can be load balanced. What I can't get my head around is how I change, for instance, the nginx conf and apply it ...
-1
votes
0answers
14 views

nginx+varnish+apache on ubuntu

NGINX: 80/443 VARNISH: 8081 Apache: 8080 Here is the configuration: NGINX: /etc/nginx/sites-enabled/default upstream varnish { server 127.0.0.1:8081; } limit_req_zone $binary_remote_addr ...
0
votes
1answer
49 views

Dynamic variables from external source in nginx proxy configuration

I need to do some conditional actions in nginx that is working as a proxy. Basically it all boils down to being able to set some nginx variable from external source. It can be a bash script or result ...
0
votes
1answer
20 views

Nginx : How to server error_pages (404, etc) using uwsgi url?

I know it's possible to server static files using error_page in NGinx, but I was wondering if it was possible to server an url from my local (socketed) Flask app that is served through UWsgi. Here's ...
1
vote
2answers
103 views

SSL will not work on Android mobile

I bought Comodo SSL from Namecheap. Now, the SSL works fine on desktop, I am getting a "This Connection is not private" on mobile phone.. on my chrome on Android Here is my virtual host file: server ...
0
votes
1answer
22 views

Replace ssl certificate in bundle

I'm not really used to administration stuff so please bear with me. Recently, the server's certificate from RapidSSL expired and we renewed an received a new one. TO replace the cert, I opened up ...
0
votes
2answers
36 views

Nginx remove everything after subdirectory

Tried searching on the forums for an answer but I'm quite stuck... I have a page called course which used to have a load of sub pages but now I need all requests for those subpages to redirect back ...
0
votes
1answer
37 views

Nginx + Gunicorn not handling 1000 concurrent users?

I'm running a site with 2 cores on the machine, and nginx(2 processes) and gunicorn(5 workers) serving a flask app. I did a stress test using locust.io to similulate 500 users, and the site breaks ...
0
votes
2answers
40 views

NGINX Proxy_Pass remove url substring

I have one NGINX acting as reverse proxy. I need to remove a substring string_1 from the URL, the rest of the URL is variable. Example: Origin: http://host:port/string_1/string_X/command?xxxxx ...
-1
votes
0answers
18 views

Nginx multiple rails apps and domains

I have a problem with Nginx. We got 4 apps on different ports ex: 8001,8002,8003,8004 and if we write domain1.com we show app on port 8001, but if we write domain1.com:8002 we show app on port 8002 ...
0
votes
0answers
37 views

Nginx reverse proxy and wordpress

Everything working well but I'm getting a issue with wordpress when I'm in the extensions page. The probleme is that there are no picture displaying of each plugin and when I click on the picture of ...
0
votes
0answers
32 views

Invalid certificate error with IE9 on Win7 and Nginx with multiple virtual hosts

We have an Nginx instance with multiple virtual hosts on the same IP address. nginx.conf has configuration similar to the following: server { listen 443 default_server ssl; server_name ...
0
votes
1answer
20 views

gunicorn behave differently when run from terminal and by service

I am using nginx+gunicorn+django for my website. The following is my gunicorn.conf file: description "Gunicorn daemon for Django project" start on (local-filesystems and net-device-up IFACE=eth0) ...
2
votes
0answers
37 views

CURL PHP can't resolve host [closed]

I'm trying a php script that is doing requests with CURL. But I get the error Couldn't resolve host 'example.com' $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER , true); curl_setopt($ch, ...
0
votes
0answers
95 views

nginx - reverse proxy for Apache and Socket.io on a SSL enabled site

My SSL secured web application consists of Apache server (PHP) and NodeJS (Socket.io). To overcome the issue of blocked ports on various networks, I decided to use nginx for redirecting the requests ...
0
votes
0answers
15 views

ngx_http_rewrite_module does not work under https schema

Why rewrite ^/location/(.+)/?$ /destination/$1 redirect; works under under "http" schema, but it does not work under under "https" schema?
0
votes
0answers
36 views

Nginx - default 404/403/500 when using proxy_pass

I have two locations in my nginx config. It tries to serve static files from local filesystem, and if the file is not found there, it tries accessing a remote file server: location ~* ...
-1
votes
0answers
28 views

How to make nginx deny malicious requests to static files?

I'd like to deny all requests to static files followed by ?foo, like /path/to/somestatic.js?foo This is a trick that application layer ddos attacks seems to use to bypass cache for static files and ...
-1
votes
1answer
37 views

After Rebooting mysite gives blank pages

Mysite is using Ngnix, I just resized my Server's RAM, after rebooting, every thing was normal, but mysite gives me blank white page, i didn't detect any "Error logs" server { listen 80; ...
0
votes
0answers
32 views

How to block nginx POST requests to certain domains?

I have repeating lines in access.log: 117.169.1.67 - - [16/Jun/2015:11:19:11 +0600] "POST /hostdata21.php HTTP/1.1" 200 50186 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR ...
0
votes
0answers
17 views

limit_req on nginx not working

Iam using Ubuntu server 14.04 with apache + nginx proxy over it. I tried to set up limit_req in /etc/nginx-sp/nginx-sp.conf as this: http { limit_req_zone $binary_remote_addr zone=one:1m ...
-1
votes
0answers
18 views

nginx + uwsgi - Flask app deployment with sqlite concurrency

I have a Flask app that uses SQLite for almost every request. GET will do SELECT and POST will do INSERT or UPDATE. SQLite connections are opened and closed properly using @app.before_request and ...
1
vote
1answer
24 views

Apache “hijacks” an URL from Nginx

I have a Ubuntu server running Apache, which hosts a Wordpress site, which is accessible using HTTP. There's also Nginx installed that hosts a Django site that's only accessible using HTTPS. Now, ...
2
votes
0answers
34 views

Nginx: SNI doesn't work for server_name with multiple arguments

With this Nginx config: server { listen 443 ssl; server_name www.x.nl x.nl; ssl_certificate /etc/nginx/ssl/x.nl.crtkeyca; ssl_certificate_key /etc/nginx/ssl/x.nl.crtkeyca; ...
0
votes
1answer
49 views

NGINX logging not working when deny all in location block

I thought this behaviour was quite weird, hence I am going to ask on here. Take this location block; location ~ /(wp-config.php|readme.html|licence.txt|license.txt|readme.txt) { access_log ...
0
votes
0answers
28 views

No script name passed to php-fpm via nginx/FastCGI

I run a PHP 5.6 instance over php-fpm without a problem (unix sockets and nginx). Today I compiled PHP 7 and also started it as a second PHP instance. While requests get served fine with the PHP 5.6 ...
-1
votes
0answers
26 views

Nginx - Is there a way to use internal directive inside if condition?

This is what I'm trying to achieve: location ~* '(/abc|/xyz)' { if ($http_cookie !~ 'cookie') { internal; } } But on nginx restart, it gives me error: nginx: [emerg] "internal" ...
0
votes
1answer
72 views

Nginx: Redirect URL to always include a locale prefix

I'm trying to achieve something with nginx and redirect rules which seems like it should be pretty straightforward, but I've run into a stumbling block. Having had a look through many questions and ...
0
votes
1answer
72 views

How Can I Have Apache & Nginx both behind Varnish?

I have a setup where I have Varnish listening on Port 80 behind Apache on Port 8080 while I intend having Nginx on 8081. My vps' control panel supports only Apache but I want to test one of the sites ...
1
vote
1answer
63 views

How to setup Nginx to use ssl/non-ssl for different urls on a single site, but always use ssl if user explicity types https in browser's address bar?

My current nginx.conf looks something like this: server { listen 80; server_name www.example.com; root /var/www/; location / { } location /users { rewrite ^ ...
0
votes
0answers
125 views

Avoid mixed content issues with the try_files directives when using Nginx as an SSL proxy?

I'm using Nginx to act as an SSL proxy inside a docker container listening on port 443. The proxy correctly works and properly routes trafic to another Nginx instance upstream on port 80 (that lives ...
0
votes
1answer
27 views

Reverting PHP-CLI back to default path on Ubuntu, NGINX, HHVM

While experimenting with optimizations on my brand new LEMH (Linux, Nginx, MariaDB, HHVM) stack; I changed the PHP-CLI config to use HHVM for /usr/bin/php by using the following command: $ sudo ...
1
vote
1answer
36 views

Nginx whitelist file extension

server { listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 server_name public; root /var/www/public; location = ...
0
votes
0answers
23 views

Nginx alert: http request count is zero while closing request

I just install NGiNX on a CentOS server. And I have been receiving strange error: http request count is zero while closing request, client: --.---.--.---, server: 0.0.0.0:80 The other ip ...
0
votes
1answer
44 views

Disable authentication for HTTP OPTIONS method (preflight request) in Nginx

My problem is the exact same one as described here: Disable authentication for HTTP OPTIONS method (preflight request). I'm trying to use CORS and HTTP passwords at the same time. When the browser see ...
0
votes
1answer
53 views

NGINX random 403 errors on page and static images

I have a problem with getting random 403 errors with NGINX. On a page "profile/user.name.1" I have static images, but they are not loading. I get the following message: "Failed to load resource: the ...
0
votes
1answer
47 views

how to make nginx proxy pass along connection refused?

I have an nginx proxy pointing at an external server. When the external server is down, the nginx proxy returns a 502 bad gateway. Instead, I'd like nginx to also refuse the connection - How can I do ...