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

1
vote
1answer
35 views

Nginx won't load css/js/images when redirecting

I need to redirect my page to a maintenance page when I get errors 50x. It does redirect, except it won't load css, js or images. The error log is clean and the access log doesn't show any problem. ...
0
votes
0answers
33 views

How to stop NGINX spawning new instances

So a bit of background, I'm running a little web app using just in-memory data. It's about 20 rows all-in so I've removed the database to speed things up. Just recently I deployed it on a Raspberry ...
0
votes
2answers
24 views

NginX redirect domain.com to domain.com/path when accessing domain.com

So basically I had to proxypass the root of a web server @ / but the application is hosted at /ui When they don't manually type /ui they are presented with the home page of the server, which is ...
-1
votes
1answer
30 views

Seperating web server from database over public network

How much of a risk is it splitting nginx web server from mysql database server and having them talk over public network? The database server would be in the same OVH DC but from what I understand ...
1
vote
0answers
19 views

Getting 404 Not Found while PHP works in background - Nginx

I have noticed that I get 404 - Not Found when calling a .php file even if the script works in background. The php file downloads a long Json and populates a db until I close the window. I am using ...
0
votes
1answer
25 views

Nginx transparent reverse proxy for https and http to another server

I have researched this for a while but the use cases that others have asked about are more complex/different to what I am trying to achieve. I have Nginx serving pages on both ports 80 and 443 for ...
-1
votes
1answer
23 views

Nginx Not Respecting File Permissions

I'm trying to apply permissions of 600 to certain files on my web server, but they are still accessible to the world (I can access them by navigating to direct link in browser e.g. ...
2
votes
1answer
24 views

Nginx location index trouble

I have troubles with nginx location block. location /myApp/api/account/tutorialPage { alias /data/www/; index tutorial.html; } if a have strict match - all is fine, a have access to my ...
-1
votes
2answers
50 views

Nginx inside docker container can't talk to other containers (running jenkins)

I'm trying to set up a nginx proxy inside docker that will listen for web traffic and then based on virtualhosts forward traffic to differerat jenkins instances also running inside docker containers. ...
2
votes
1answer
29 views

Run a specivic (older) php version with nginx, php-fpm on debian

In order to migrate old php software, I want to run php 5.3.* so I: Removed php via apt-get purge php* Added the corresponding http://snapshot.debian.org/archive/debian/ to the sources Installed ...
0
votes
0answers
8 views

Scaling and HA LEMP coming from a single server setup

here is the current configuration 1 Server: nginx php-fpm memcached mariadb 10 The project is growing fast and in the midterm we need to scale. When I have to setup multiple machines I want to ...
0
votes
1answer
12 views

Insert a variable route path into nginx location configuration

I have a simple user based storage for images where I have a main folder say 'users' and within it, my server creates variable folders to store images for each user. The string used for the folder is ...
0
votes
0answers
17 views

Does nginx consider a page request as one request or more (including static files)?

Lets say we have a configuration as below: http { limit_conn_zone $binary_remote_addr zone=conn_limit1:12m; limit_conn_zone $server_name zone=conn_limit2:24m; [...] server ...
0
votes
0answers
34 views

ssl (https) for https://my.example.com resolves to https://example.com ip address

I have a server my.example.com with ip address 111.111.111.222 I have a server example.com with ip address 111.111.111.111 I created an ssl certificate with letsencrypt for my.example.com However, ...
0
votes
0answers
37 views

Second subdomain redirects to the main domain, but URL remains the same as second domain

It's quite strange to see this issue as title describes. Here are the details: 1) Created a A-record with "a1". Means subdomain is: a1.example.com, 2) created directory by "sudo nano ...
-1
votes
0answers
64 views

Cannot deploy containers on a private docker registry

I'm trying to setup a private docker registry, but no matter how hard I try there's always something that goes horribly wrong. In my current setup, here's the error I receive: $ docker push ...
1
vote
2answers
41 views

Nginx cache invalidation only works if invoked from the same domain

I am using FRiCKLE's ngx_cache_purge module to invalidate proxy caches. I ran into a problem of not being able to purge caches when accessing the invalidation url with a different HOST part of url ...
0
votes
1answer
33 views

Nginx - Can I specify rate in limit_req_zone in requests per hour?

While limiting the number of requests from an IP, I am using limit_req_zone $binary_remote_addr zone=one:10m rate=1r/m; I can specify the rate in r/m (requests per minute) or r/s (requests per ...
2
votes
2answers
36 views

Multiple domains in nginx without repetitive configuration

I have 2 domains names exemple.net exemple.com and lot of sub-domaines demo1.exemple.com demo2.exemple.com ... demo50.exemple.com Currently I have 50 blocks like this: server { ...
-1
votes
0answers
23 views

Keep Referer Information in Reverse Proxy [on hold]

I have one Apache Http making reverse proxy to service that is running other server in NGINX. The service running in the second server need to get the referer and other information from the public ...
1
vote
1answer
50 views

PHP 7 and 5.6 parallel in Nginx

I want to use PHP 7 with newer apps and PHP 5.6 with apps, that doesn't work with PHP 7. So I try to configure Nginx to enable different PHP versions for different pathes. But it doesn't work: # ...
0
votes
0answers
18 views

Nginx: Conditional request gunzip when `Content-Encoding: gzip` is set

How would it be possible in nginx to evaluate if the Content-Encoding: gzip request header is set (coming from a web client to nginx), and then let nginx gunzip the request before it gets forwarded to ...
0
votes
1answer
18 views

Nginx dynamic proxy - without re-compile

I have an Nginx container which gets request on URLs matching: http://nginx/cometd/{operator}/{gameKey} I'd like to proxy the requests elsewhere, ...
0
votes
1answer
33 views

configure nginx with multiple locations

I have nginx configuration like this: location = / { [ configuration A ] } location /documents/ { [ configuration B ] } location ~* \.(gif|jpg|jpeg)$ { [ configuration C ] } If I ...
0
votes
1answer
32 views

Getting Nginx working with /index.php/something

I'm trying to migrate from Apache to Nginx. I'm using Nginx 1.8.1 and PHP 5.6 Apache accepts URLs like this: domain.com/site/index.php/something and calls index.php script with the parameter ...
0
votes
0answers
13 views

How to configure nginx to process requests sequentially (without concurrency)?

I'd like to process each http request coming to the server sequentially so that while one request is being processed, the others are waiting. Is there any way I can do this with nginx? The server is ...
2
votes
2answers
34 views

How to reverse proxy to different places depending on subdomain in Nginx?

I have multiple subdomains, all pointing to one machine, and one IP address. On this machine, I want to have nginx acting as a reverse proxy, and depending on which subdomain was used to access the ...
0
votes
1answer
21 views

AWS EC2 server- http traffic not reaching server

I am new to AWS and I have a t2 micro instance. I am only using it to host a static website with nginx. What is really strange is the public ipaddress(which I use for SSH) is not the same as the ...
3
votes
1answer
38 views

php-fpm and nginx @ high CPU usage?

My server is with DigitalOcean with the following plan: 2 Core Processor 2 GB Memory My website is receiving thousands of visitors, however, both CPU cores are @ 100%: The issue seems to be with ...
0
votes
0answers
29 views

How do I deploy a Python 3 Flask application on my Ubuntu VPS?

I know it really feels like this has been answered over and over, but I cannot seem to get a straight answer for this. I have developed a fairly simple Flask application in Python 3 - it is all in ...
1
vote
1answer
60 views

Appending an argument to request_uri for mobile subdomain on nginx

I'm running a multilingual wiki (MediaWiki 1.26.2 with MobileFrontend) on nginx 1.9.3/OpenBSD 5.8. For each language wiki, I have a separate MediaWiki installation folder and a subdomain like ...
1
vote
1answer
42 views

Postfix can't connect to MariaDB on 127.0.0.1

(Yes, this question seems very similar, but I understand why I get the message. What I don't get, and can't find any palpable information about on my own, is what to do about it. So here I am.) I ...
0
votes
0answers
15 views

Socket.io w/ node.js + nginx +mysql + php5-fpm Memory Leak?

I have a Debian VPS running node.js socket.io server + nginx + mysql +php5-fpm and the socket server seems to freeze with no messages and no errors. I noticed that the memory usage grows over time but ...
1
vote
1answer
30 views

How to delete hyphen and underscore from url string in nginx?

I have been trying to delete ANY/ALL hyphens - and underscores _ from an incoming URL request to my nginx server. So to be clear, when someone enters a URL as follows: ...
1
vote
1answer
25 views

Nginx location prefix issue

I noticed in my error logs that some requests for favicon.??? are looking for the file in various directories (not root). I used "grep" and checked my server files and all meta tags, etc - and they ...
0
votes
1answer
17 views

Nginx, angularJS, django and phantomJS configuration

I have succesfully set up Django, angularjs and phantomJS (for SEO purposes) to work together, however I am having a small problem with routes. http:// something.com/?_escaped_fragment_= gets ...
0
votes
1answer
38 views

how to restrict access to wp-login.php by IP address on nginx

I have the following configuration for my wp site which is running on nginx 1.8.1 location ^~ /wp-login.php { allow 10.0.0.0/24; deny all; } location ~ \.php$ { try_files ...
2
votes
2answers
36 views

Nginx remove characters from variable

Basically what i want to do is put the requested URL into a variable, and then remove a character (like /) and get a new variable. I'm trying to implement trailing slashes at the end of the URL's; ...
5
votes
2answers
154 views

nginx use proxy cache if backend is down

I need to nginx proxy use cache if backend server down: this is my configuration. but seems be nginx use cache without check backend server. http { # ... proxy_set_header Host $host; ...
0
votes
1answer
23 views

nginx + php-fpm is extremely slow

I have a very low tier VPS - 1GB ram and 1 CPU w/ 30gb SSD running CentOS (v7.2.1511). The server only servers php-fpm (v5.4.16) and nginx (1.6.3). Mysql and Mongo databases are on another server. I ...
1
vote
0answers
22 views

PHP page refuses to appear despite checking php-fpm, SELinux, and nginx

Problem I have a small web server that hosts a small PHP page that performs a very small function. I used to host this on another machine. I move the website to a new machine with a different ...
0
votes
1answer
24 views

match special characters in url in nginx

I ran dotdotpwn to test transversal attacks on a web server using nginx/nasxi/doxsi and the only "successes" were urls that started with a question mark. No big deal since they just defaulted to the ...
0
votes
1answer
19 views

Reverse proxying a Websocket upstream with Cloudflare

I was going to ask on the main SO boards, but figured this place would be more appropriate. I am wanting to use cloudflare on my main website and then use nginx to reverse proxy a directory to my ...
0
votes
0answers
22 views

How can I configure both Laravel and PHPMyadmin on Nginx?

My Nginx server directive looks like this: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /var/www/laravel/public; index index.php index.html ...
0
votes
1answer
44 views

My nginx conf disallow real folders access and index

I have Cockpit CMS installed and with this conf file, every real folders where I have files or subwebsites that I want to share or access are interpreted as 404 pages, I guess because of this part : ...
0
votes
1answer
24 views

cannot change nginx error log file name

Is there a way to change the error log file name. Whatever I am doing, I always get the error logs written to the default file name "error.log" when a request gets processed. I have a global and only ...
0
votes
1answer
29 views

How to make http to https redirect work without redirect loop

I have the following nginx conf file, everything I want is working except http traffic redirecting to https. when I add server_name example.com to the (first) server block that redirects http to ...
0
votes
0answers
10 views

nginx proxy_cache store callback - store cache keys in mysql

I have multiple servers with nginx installed on them. We would like to cache large static content (> 1gb) on our nginx servers which is fetched from a remote storage server. We are trying to set up a ...
-1
votes
0answers
29 views

Work with compile from source and Package Managers

I have doubts about how do work nginx install from source and work with php and mysql from packages manager. I want to install nginx install from source and install mysql and php via yum (Package ...
0
votes
0answers
11 views

Mosecurity with Nginx logs the 127.0.0.1 as destination

I am using Modsecurity with Nginx. It works and everything is fine unless the modsecurity logs the destination as 127.0.0.1. How can I set the destination with Nginx $proxy_host variable or whatever ...