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
vote
1answer
28 views

Is there a clean way of combining nginx location rules?

Suppose that in my nginx server I want to accomplish these two requirements: 1) all *.php files are to be passed to the php interpreter 2) directory /private/ will require http authentication If ...
0
votes
0answers
25 views

nginx config with php5-fpm subfolders

I have an issue configuring the php5-fpm on nginx. when I go to open a .php page on my site, it gets downloaded instead of being executed. so as if the php5-fpm is not working!! here is my vhost ...
0
votes
1answer
28 views

Nginx serving wrong site

I have nginx setup on my vps with a static ip and 2 domains (beryju.org and nope.berlin). I want to serve: Site 1 to beryju.org Site 2 to blog.beryju.org Site 3 to i.beryju.org Site 4 to ...
0
votes
1answer
30 views

Mapping URLs to files in nginx

In config file, location /i/ { root /data/w3; } The /data/w3/i/top.gif file will be sent in response to the /i/top.gif request. How can I set it to ignore i in file paths? Indeed I need ...
0
votes
0answers
45 views

I can't set virtual hosts with nginx 1.6

I'm trying to set further virtual hosts on my nginx server. But only the ones created on nginx 1.2 work and if I try to add other virtual host , it redirects to default configuration where I have the ...
1
vote
0answers
41 views

jsonrpc service nginx ssl configuration

I have a python jsonrpc service running in the server on port 8082. I want to reach it with php jsonRPCClient. (and have to be https) My nginx server looks like: server { listen 443; ...
-1
votes
0answers
40 views

Nginx reverse proxy transparent URL to tomcat

i want setup nginx like this example; page.com/something1/ >> internal.tomcat:8181/webapp1/ page.com/something2/ >> internal.tomcat:8282/webapp2/ At the moment i'm using this config; ...
2
votes
2answers
258 views

Nginx 502 Bad Gateway - 111: Connection refused, port not being listened to

I'm aware there are many other similar questions but the solutions from those questions I feel I've already got in place. I've got 3 sites running locally on a VirtualBox Ubuntu 12.04.4 LTS Server, ...
0
votes
2answers
51 views

nginx - Change error_page based on proxy_pass response

Is it possible to change the fallback error_page based on the response of the upstream proxy? upstream serverA { server servera.com; } upstream serverB { server serverb.com; } location / { ...
1
vote
0answers
41 views

Nginx proxy pass not working sometimes

I have a proxy server (ubuntu) that can accessible via my global IP (not have domain). For Example 85.45.0.12:6021 and this reverse to local server. Local server (10.0.0.25) installed tomcat and ...
0
votes
1answer
43 views

Nginx Config on DreamHost VPS

I got my site up and running on nginx on my Dreamhost VPS. Cool. I wanted to limit the number of connections per IP by adding the following to the http block of the site-wide nginx conf file ...
0
votes
1answer
39 views

Use ports instead of domains for multiple sites

I have a server without domains, but I would like to run a few websites there. I would like to do it using ports instead of domains. I setup a site for this port and set the application directory as ...
0
votes
0answers
166 views

High Performance AWS EC2 / RDS + Nginx + PHP-FPM setup

General description of the issue We're currently running an application on a PaaS type solution for PHP. Their solution is based on AWS cloud and due to the fact that their plans don't fit our ...
0
votes
1answer
26 views

Nginx enable direct access only to images

I would like to expose files in /var/files to the user on http://myweb.com/img/someimage.jpg but also to disable accessing non-image files. This is what I am trying to do, but it does not work, could ...
2
votes
2answers
50 views

Nginx Reverse Proxy Will Not Load HTTPS Sites

Today has been the first time I've used Nginx. I got it set up as a dedicated reverse proxy by following a few guides. This is what I'm trying to recreate - ...
0
votes
1answer
15 views

Chromium wants to download a html page

An issue that happens much too often, but this time I can't find the way out: I have a Wordpress site using the following special permalink configuration: /%post_id%/%postname%/. Everything seems to ...
0
votes
2answers
45 views

nginx as reverse proxy on front of Apache - protection and security

I'm just concerned whether to install Nginx WS alone or nginx as reverse proxy on front of Apache based on security and protection. If I had to choose nginx as reverse proxy on front of Apache, would ...
1
vote
2answers
44 views

How can I tell nginx to serve SSL for one domain only?

Yes, this is something of a duplicate to this question, however, according to the ngnx document "Configuring HTTPS servers" (the section "Single HTTPS Server"), this limitation no longer exists, and ...
0
votes
0answers
15 views

nginx $upstream_cookie_… variables

nginx 1.7.1 introduced Feature: the "$upstream_cookie_..." variables. see http://nginx.org/en/CHANGES What does it do and how do you use it? Can that be used for Session Affinity when proxying to ...
0
votes
0answers
20 views

How to change http header using nginx

We have a problem that a backend system requires the parameters of the Content-Type http header to be in a certain order. For example (note the position of the type="text/xml"): Content-Type: ...
1
vote
1answer
29 views

Nginx client request max time

I have an Nginx web server that will proxy to some other servers behind, and when I test a file upload request by exercising a cap on the upload speed to modem like speed, I managed to hold the upload ...
0
votes
1answer
48 views

nginx reverse proxy all requests to two upstream servers?

I need to adjust a nginx reverse proxy which used to front a single server to send all requests it receives to two different upstream servers. I was thinking I could do it with the configuration ...
0
votes
3answers
58 views

Architecting a web server hosting mixed small and large (100MB+) static content [closed]

I have the challenge of hosting about 200-1000 mp3 files, all in the 100MB+ size range. Furthermore, there are some smaller RSS files, and some smaller JPG files. All this is static content, no PHP, ...
0
votes
0answers
57 views

How to figure out nginx 502 errors when logs are ok

I'm running a blog (on Wordpress) with nginx 1.6.0 + HHVM 3.1.0 + memcache on Ubuntu 14.04. Every few hours (~12-20h), nginx throws a 502 error and my blog gets down. I tried to figure it out, but I ...
0
votes
1answer
24 views

ngnix proxy https request to subfolders

We have several external facing web applications behind nginx like so: https://app1.mycompany.com --> server1:8080/app1 https://app2.mycompany.com --> server2:8080/app2 ...
2
votes
0answers
29 views

Nginx + wordpress in different directories [closed]

Trying to get a /blog working with wordpress alongside an existing application running at root (also php). Cant seem to get wordpress running with assets. Any ideas? server { listen 443 ...
0
votes
0answers
21 views

reverse proxy nginx websockets with sub_filter

I have simple reverse nginx proxy location /websocket/ { proxy_pass ​http://backend_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection ...
-1
votes
1answer
22 views

Running PHP in HTML Files on NginxProxy Centos

I have a ngnixproxy server on Centos 6.0. Wordpress and php files are running fine. But I have a static site with an html file with php code in it. The code is not working and the server is ...
0
votes
0answers
66 views

nginx custom error page does not work when putting 404 response code in php

server { root /var/www/; index index.php; server_name example.com; location / { try_files $uri @rewrite; } location @rewrite { rewrite ^/(.*)$ ...
0
votes
0answers
21 views

Why does nginx ssl_session_id change on the next request after a HTTP post?

I was trying to use ssl_session_id for an additional validation step during authentication in my web app, but it seems like nginx changes the ssl_session_id after a POST request or maybe other ...
0
votes
3answers
130 views

My webserver is getting flooded with invalid requests

My webserver (nginx) keeps getting requests like this: 23.244.104.206 - - [15/Jun/2014:21:21:47 -0400] "GET ...
0
votes
0answers
30 views

nginx on plesk - listen / server in multiple configuration files

Just a quick clarification on nginx and the "listen" config option. Recently had to change IP addresses on this Plesk box and there are quite a few vhosts with custom nginx config files. These ...
0
votes
1answer
98 views

PHP-FPM with Nginx not Working on port 80

I am trying out nginx on my Ubuntu 14.04 desktop, I have referred to some basic setup articles and have installed the latest Nginx and PHP-FPM from the apt repository. I have nginx working and can get ...
0
votes
2answers
60 views

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by ...
0
votes
0answers
25 views

Redirections to ajenti port using nginx aren't working [duplicate]

I recently installed Ajenti with the Ajenti V plugin suite and got it configured in a way that the https://ajenti.domain.com:8000/ link works. So what I was trying to do is to redirect ...
0
votes
1answer
86 views

NGINX SSL Connection Error

I've added an SSL certificate to my server. (Nginx running passenger & Rails). I created a CSR, uploaded to GoDaddy, downloaded the keys. Inside /srv/ssl I have www.mydomain.com.crt ...
0
votes
1answer
78 views

Two domains, two SSL certificates, one IP

I'm trying to run two domains, one with a wildcard certificate and the other one with a regular certificate from one IP and one nginx. Setup: example1.com with wildcard certificate example2.com with ...
0
votes
1answer
19 views

nginx redirect to varios directories

I am looking for a way redirect the URLrequest to various directories. For example the user calls server.com/get.php I want it randomly be redirected to server.com/a/get.php, or ...
1
vote
1answer
81 views

Adding PageSpeed Module to installed nginx

I like to add the Google PageSpeed Module to my nginx webserver on Ubuntu. This link gives a simple overview https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source?hl=de ...
1
vote
2answers
123 views

tune up performance nginx php-fpm mysql

I am running a nginx+php-fpm+mysql on virtual server with 8 cores and 16G ram My aplication is a simple API provider server, which returns JSONs generated from mysql database on requests. Datasets are ...
0
votes
1answer
51 views

Configure both php and node app together using nginx

I have an Ubuntu VPC. I have a nodejs app running on it in some folder. I have a php app running on apache in var/www. What I want is to configure nginx so that when a user comes on mydomain.com , ...
0
votes
1answer
87 views

Nginx alias or rewrite for Horde Groupware ActiveSync URL does not process the rpc.php file

I'm trying to setup a Horde groupware with Nginx. The webinterface works but I do not get the ActiveSync specific URL to work. The Horde Wiki explains how to use it with an Apache Webserver here. My ...
0
votes
0answers
35 views

Forward to same proxy_pass for any request_uri in nginx

I would like that any requests made in a particular location are proxied to the same destination, regardless of the request_uri location /here { proxy_pass "http://localhost/"; } GET /here ...
1
vote
3answers
102 views

Is it possible to extend a 504 timeout in nginx on a per location basis

Is it possible to set timeout directives within a location block to prevent nginx returning a 504 from a long running PHP script (PHP-FPM)? server { listen 80; server_name ubuntu-vm.test-api; ...
0
votes
0answers
49 views

Empty $upstream_http_location variable if response was cached

I would like to cache the response of an redirect. (Cache the request to some site which returns a redirect and cache the second request which returns the actual content.) So far my config looks like ...
3
votes
2answers
472 views

When a server IP changes, do exising TCP (e.g. http/mysql) connections remain running

We have some PHP-FPM servers and when they need a database connection, they connect to an HAProxy server which selects them a database server to use and the connection opens. When we then want to ...
1
vote
0answers
82 views

CORS Fails on CloudFront Distribution with Nginx Origin

I have a CloudFront distribution set up with an Nginx server as the origin (a Media Temple DV server, to be specific). I enabled the Access-Control-Allow-Origin: * header so fonts will work in ...
0
votes
0answers
34 views

restart nginx after modifying settings.py and urls.py

In my django project, I modified the files settings.py and urls.py. My web application runs on nginx server. I reloaded the server using the following command: /etc/init.d/nginx reload But the ...
0
votes
1answer
38 views

How to make Nginx redirect without adding a tail string to redirected server

I have an Nginx that redirects to several different web servers based on URL path after host. My Nginx host is nginx.main.com current redirect rules are # Redirects for Math location ~ ...
0
votes
1answer
37 views

How do I change the root path in nginx

I have installed nginx on my Ubunut 12.04, I am not able to change the root directory for the nginx, This is the default nginx configuration file: server { listen 80 default_server; ...