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
2answers
94 views

Nginx add trailing slash without rewrite

I am trying to create redirect to add trailing slash, location / { if($request_uri ~ ^([^.]*[^/])$){ return 301 https://$host$request_uri/; } } I have no idea how to do ...
0
votes
0answers
11 views

Nginx How to set up Basic Auth for a subdirectory and its php files [duplicate]

I would like to restrict the access to a subdirectory and the access to the php files it includes. My problem is that I can't figure out if it is possible to have this running without having to ...
1
vote
0answers
86 views
+100

When do I get Nginx Cache Expired tag?

What my webserver intends to do is when it gets a request to a certain url, it sends an API call to a third party service. To prevent exceeding the API limit, I cache the result for an hour for the ...
0
votes
0answers
16 views

Multiple document root with nginx

I need to configure nginx so it serves a different software from a different document root on a domain's subdirectory as follows: http://example.com/... - main site from /var/www/main ...
0
votes
0answers
48 views

Nginx + Apache + PHP-FPM, VirtualDocumentRoot not working

I'm having a webserver with Nginx (1.7.10) is front of Apache (2.4.12), everything is fine until I used VirtualDocumentRoot for mass virtual hosting. I got this error in the log: [Fri May 15 ...
0
votes
2answers
67 views

SSL works in Chromium but not Firefox (nginx)

I'm using client-side SSL certificates to access my web server. Suddenly stopped working after several months with no changes to my nginx config, but only in Firefox. Still works fine in Chromium. ...
1
vote
0answers
32 views

How to override “Content-Type” header with PHP script on Nginx

I have some php script which returns jpeg image(1x1 pixel) with content type "image/jpeg": // return image $image_name = 'img/pixel.jpg'; $image = fopen($image_name, 'rb'); header('Content-Length: ' ...
0
votes
1answer
17 views

Meaning of ssl_ciphers line on nginx.conf

What is the meaning of the following line from an nginx.conf file? ssl_ciphers HIGH:!aNULL:!MD5; I know the ssl cipher is specifying which algorithm to use to secure the server communication and ...
1
vote
1answer
20 views

Error with Python2 as a https client with an nginx server and SSL certificate chaining

I am having trouble getting Nginx 1.8 working with my certificates so that I can use a python2 based https client. (requests.py, URLLib) I've tried using Comodo and GlobalTrust wildcard certificates ...
1
vote
0answers
16 views

How to correctly secure Reverse Proxy communication with actual server in LAN

I have Nginx acting as gateway and reverse proxy for requests based on host name. However, the communication with the actual server in lan isn't secured. Does the connection remain encrypted with ...
-5
votes
0answers
31 views

Block All Connections Not From CloudFlare [duplicate]

I have a simple request. I would like to only allow traffic to my server from cloudflare. My website is being pounded by attacks, and there is no legit reason someone should be making a connection to ...
-2
votes
1answer
10 views

php-fastcgi.socket does not exist

I am following this tutorial, and have gotten thus far: I have installed the following packages using apt-get install nginx php5-cli php5-cgi spawn-fcgi psmisc. Despite installing PHP FastCGI, I do ...
0
votes
0answers
25 views

NGINX reverse proxy beind another nginx reverse proxy

I have a docker container (lets call it APP) that exposes port 80. That port contains an nginx reverse proxy. Internally / goes to a REST service listening on another port. While /auth just serves ...
0
votes
1answer
21 views

nginx rewrite in subfolder

I'm venturing now into nginx rewrite rules so it's a fairly new topic for me. I have in the root folder a series of pages which i use rewrite rules as follows: server { listen 80; ## listen [::]:80 ...
0
votes
2answers
35 views

Nginx Site Config Templates and Variables

Hi I am looking to set up a simple nginx config, I read you can set variables using set $variable content; but so far I've had no luck... Below is what I have come up with so far/what I am trying to ...
0
votes
0answers
22 views

Linux / Nginx - Centralized SSL Certificate Hosting

I manage about 20 virtual machines all running different web applications. The domain names of these web apps are subdomains of the same domain. I have one wildcard SSL certificate which will work for ...
-1
votes
1answer
37 views

server_name in nginx.conf seems to be ignored [duplicate]

I've got a domain name, let's say example.com that point to my server. And my nginx.conf is: upstream domain { server 127.0.0.1:8002; } server { listen 80; server_name ...
1
vote
1answer
164 views

(nginx) Apache Forbidden error (at random): No error logs

I am running an Nginx server, but as of late I am randomly getting "Forbidden" errors by Apache, and it seems to never happen at "first" visit, only after refreshing/browsing for a while. What is ...
0
votes
0answers
164 views

Nginx upgrade to 1.8 - Now getting 502 bad gateway

Today I upgraded my localhost server from nginx 1.6.3 to 1.8.0 and now all my local websites are getting a 502 bad gateway. A standard nginx config file is as follows server { charset utf-8; ...
1
vote
1answer
33 views

nginx: Trouble after upgrade to newer version

I have upgraded my nginx server from 1.1.19 to 1.8.0 using this tutorial. My website is still working. So I thought, that everything was ok. I have made a google pagespeed test, and showed me that ...
1
vote
0answers
36 views

High CPU Usage and hangs randomly with HHVM

I'm using phpbb on Centos 7 with 512mb of ram and 1 core. And I'm having randomly hangs and high cpu usage when I get some url of my clean phpbb installation. This is my server.hdf file: idFile = ...
1
vote
0answers
27 views

nginx relative path to include

In an nginx conf file, is there any way to specify the include to another conf file relative to the current conf file? I would like to write: server { listen 80; server_name localhost; ...
0
votes
0answers
46 views

Why doesn't nginx let me serve a different root path?

I'm trying to get nginx to treat /u/apps/my_app/www as my root directory, but it keeps using /usr/share/nginx/html instead. Searching for an answer as to why, I was told to edit the root in ...
0
votes
1answer
36 views

Single Nginx Load Balancer for 2 different clusters (web, api)

I was wondering if it was possible to use a single Nginx server to load balance my web servers and api servers if both are using port 80. In this setup there would be 5 servers, 1 Nginx and 4 Apache ...
0
votes
1answer
24 views

nginx on Windows always return text/plain

I'm using nginx 1.6.2 on Windows (development machine) and I have an issue where it will always return a text/plain value for the Content-Type header of any file. This is a problem because then ...
2
votes
0answers
32 views

Nginx -s quit does nothing after 1.8 upgrade, how can I debug and/or find the issue?

The premise of this question is unfortunately vague but I can't pinpoint a more specific issue. I upgraded a machine from nginx 1.6.3 to 1.8 and now issuing a nginx -s quit does literally nothing. The ...
1
vote
1answer
29 views

Can someone explain nginx conditional flags? (-f, -d, -e, etc)

I'm in the process of migrating from Apache to nginx and have used http://winginx.com/en/htaccess to migrate the rewrite rules. I'm trying to understand what the translated ones mean though and I ...
2
votes
1answer
26 views

Posting url of rails application on FB without https replace meta tag description with “welcome to nginx”

I have a rails application deployed on an amazon ec2 ubuntu instance, configured with nginx which is working fine. The problem is when I try and post the url of the site on facebook without https ...
1
vote
0answers
15 views

Nginx req_limit_zone whitelist ip's geo module

I have setup nginx req_limit_zone to limit requests to my webserver. Also I added geo to whitelist certain IP's so request limit does not affect those IP's. The problem is that once I test it with ap ...
0
votes
1answer
37 views

How to parse and retrieve both subdomain and host name label in Nginx

I'm working with an environment for testing purposes based on a few magento versions over a nginx + php-fpm + mysql stack, i puts each distribution in a different folders and in the nginx vhost config ...
0
votes
0answers
27 views

Django / uWSGI - Nginx giving 502 status code: error.log says “Permission Denied”

I'm trying to setup my Django app to use uWSGI and Nginx. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html I'm on the "Using Unix sockets ...
0
votes
0answers
24 views

Nginx passing Server $status through fastcgi

i'm passing through fastgci the server $status to handle the errors_page with a php file. like so. fastcgi_param REDIRECT_STATUS $status; this way works but is clearly not the "correct" way ...
1
vote
1answer
143 views

Which “try_files” nginx directive is best for the zero-day exploit?

So far I have been using the following in the php location of my nginx config files try_files $uri $uri/ /index.php?$query_string; However, I just saw in the Wordpress Codex guide that for the ...
-1
votes
0answers
60 views

Redirect issue with nginx - Only redirects to home page

This is the problem, I'm trying to setup a redirect from naked domain to www. However, no matter the source domain, it always redirects to the root domain no matter where I came from, for example: ...
2
votes
1answer
43 views

nginx redirect that forces update of URL in the browser

I have a very basic nginx setup that redirects www.example.com to example.com, following the best practice. It works, and in the Tor Firefox browser, going to http://www.idorecall.com/blog indeed ...
0
votes
1answer
46 views

Moving a web application to use HAProxy, Varnish, and nginx

I currently have 4 web application servers (running on application) on Rackspace that sit behind a Load Balancer (on Rackspace). In front of the Load Balancer. The application itself makes moderate ...
-1
votes
0answers
36 views

Nginx www to naked domain redirect - Error

I've set my nginx config up like this (as described here): server { server_name www.domain.com; return 301 $scheme://domain.com$request_uri; } server { server_name domain.com; ...
1
vote
0answers
47 views

Django uwsgi Nginx not serving media files - Django returns 404 status code

I originally posted this on SO but I think it might belong here instead. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html Everything was going ...
-1
votes
0answers
39 views

nginx catch all server block not working as expected

I want to block specific country traffic for the entire server, that hold mutiple domains; for that im using geo ip, Please see below configuration, its working fine if we put the deny country ...
1
vote
1answer
37 views

Nginx Process getting lost by Upstart

Usually I can reload my nginx configuration by typing sudo service nginx reload and everything is dandy. However, today I tried it and got reload: Not running I tried restarting nginx and at first I ...
1
vote
1answer
28 views

Some (but not all) stuff still logged to /var/log/nginx/error.log despite being configured to log elsewhere

here is scee.conf - pid ./pid; error_log ./error_log debug; events { worker_connections 1024; } http { access_log ./access_log; server { listen 31415; } } I run it using nginx -c ...
0
votes
0answers
43 views

ruby on rails 404 not found after deployment

I'm getting a 404 not found error after deploying my rails app. I'm using: ubuntu, nginx, capistrano, & unicorn. These are my configurations: nginx.conf upstream unicorn { server ...
0
votes
1answer
48 views

How to choose nginx version during rpm install

According to nginx.org instruction on how to install nginx by .rpm, it says that I should do the following. open nginx.repo $ vi /etc/yum.repos.d/nginx.repo paste the following content in it (for ...
0
votes
2answers
39 views

CentOS - Nginx logs got deleted - unrecognized system restart, why? How to prevent?

I am using CentOS Linux release 7.0.1406 (Core). The last time I logged in to SSH of the server was on April 20. Everything was working fine. Today I logged in once again to check if anything new in ...
0
votes
1answer
49 views

Nginx reverting to sslv3

I'm using nginx as a reverse proxy and I'm trying to turn off sslv3 support. I have found various answers both on here and other various sites. They all suggest all I need to do is add something like ...
1
vote
0answers
15 views

Getting 403 Forbidden w. Referer on Nginx+Passenger

We're using Nginx 1.6.2 + Passenger 5.0.6 and have a vhost defined with PHP-FPM which serves a MODx installation. Only one location /sinatraapp serves a Sinatra App using Ruby 2.1.1. The setup is ...
0
votes
0answers
53 views

Make NGINX Block All Requests To Direct Server IP - Stop XML-RPC Attacks

Essentially, my website is being attacked by a layer 7 XML-RPC attack and is currently offline and has been offline so I am in need of desperate help. Any assistance would be greatly appreciated :)! ...
0
votes
1answer
28 views

Unable to set AJXP_DATA_PATH variable for Pydio in CentOS

I'm trying to launch Pydio on my CentOS 7 server with Nginx. I get to a point where everything is working, I mean I get a Pydio Error, it is generated by Pydio. Impossible write into the ...
-5
votes
2answers
28 views

finding all sites hosted on a nginx server [closed]

So is it possible to find out every single site (vhost) hosted on a nginx server ? For example Nginx config : server { listen 80; server_name domain1.com; } server { listen 80; server_name ...
2
votes
1answer
32 views

Algorithm behind nginx etag generation

What is the algorithm used to generate etags in Nginx? They look something like "554b73dc-6f0d" now. Are they generated from timestamp only?