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: 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: ...
0
votes
3answers
29 views

Not able to find /etc/nginx/sites-enabled/default

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
1answer
1k views

Rails 3 passenger nginx application spawner server error on Synology NAS

Question updated, please read UPD2. I'm trying to deploy app through passenger nginx module on DS710+ (ruby 1.9.2p0 installed). There is syntax error relative to ...
0
votes
0answers
8 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 ...
2
votes
1answer
55 views

Domain redirects to wrong site in nginx, multiple sites in config files

I have 2 websites setup on nginx, and the correct one should load depending on which domain is accessed. For example: website1.com website2.com However, when accessing either of these domains, they ...
2
votes
1answer
929 views

Nginx Virtual host 403 Forbidden

I have just brought a domain name (example.com) and have setup a URL frame redirection to my server's IP XXX.XXX.XXX.XXX, however I am getting a 403 forbidden error. I can access pages fine via the ...
-7
votes
2answers
42 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 ...
0
votes
2answers
23 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
24 views

Configure Zabbix API through Nginx the most performant way

I'm looking for a complete performant solution to configure Zabbix through Nginx, not Apache HTTPD that comes by default. I personally dislike HTTPD and interesting if there any specific ...
0
votes
0answers
13 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
8 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 ...
3
votes
2answers
5k views

403 Forbidden when trying to access a folder in document root of nginx

When I access index.php, it works fine. But on localhost/pset7, it gives a 403. Here is the permission log, -rw-r--r--. 1 root root 51 Jul 31 14:21 index.html -rw-r--r--. 1 root ...
1
vote
1answer
1k views

Getting 502 bad gateway after updating php to 5.5

On my ubuntu 12.10 server I upgraded php to 5.5. After getting 502 errors on my wordpress site I did some googling and discovered I need to change my nginx configs to match the passing of php scripts ...
0
votes
0answers
19 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
16 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. ...
11
votes
1answer
18k views

Configure Nginx as reverse proxy with upstream SSL

I try to configure an Nginx server as a reverse proxy so the https requests it receives from clients are forwarded to the upstream server via https as well. Here's the configuration that I use: http ...
0
votes
0answers
4 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
1answer
1k views

Error 503 Service Unavailable Varnish

So I setup a new cloud based instance with Ubuntu 12.04, with nginx, php5-fpm and varnish. Before I installed and configured Varnish, the website worked fine, virtual hosts worked. After setting up ...
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
216 views

why django project failed deploying? - django + nginx + uwsgi

I am trying to deploy a Django project through Nginx and uWSGI. If I run the project manually running python manage.py runserver :8000 it works fine, so the project itself is not the problem I guess. ...
1
vote
0answers
36 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 ~* ...
-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
0answers
2 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 ...
5
votes
3answers
2k views

How to automatically update nginx upstream server list when aws ec2 hostname changes or increases?

I want to setup autoscaling in AWS. I don't want to use Elastic Load Balancer. Autoscalling in Amazon creates EC2 instances seamlessly during demand spikes to maintain performance, and decreases ...
1
vote
2answers
935 views

Varnish 4 Working Config (optimized) for Wordpress (default.vcl)

I have successfully set up varnish 4 on my nginx 1.6.2 it is working but as per the test on http://www.isvarnishworking.com/ it shows Varnish appears to be responding at that url, but the ...
0
votes
1answer
13 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 ...
3
votes
2answers
40 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. ...
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: ...
0
votes
0answers
35 views

UPSTREAM backup is pausing if WEB1 interface is down

upstream cloudpbxtest.synox.jp { server 10.0.7.2:443; server 10.0.7.7:443 backup;} server { listen 443; server_name cloudpbxtest.synox.jp; ssl on; ssl_certificate /etc/nginx/ssl/cloudpbxtest.crt; ...
4
votes
1answer
3k views

nginx stop/reload on windows failed for Access is denied

I am running nginx on Windows Server 2008 R2 (x64) as a windows service. I am using Windows Service Wrapper for that. (Actually, I have followed this tutorial: ...
3
votes
3answers
766 views

How to run datastax opscenter behind nginx

I would like to run datastax cassandra opscenter behind Nginx. But it keeps adding opscenter port (8888 by default) to all urls. Is there a config setting to disable that or something? Here is my ...
1
vote
2answers
34 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 ...
-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 ...
0
votes
0answers
13 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
9 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/ { ...
3
votes
1answer
2k views

Reduce Gitlab memory footprint

I'm currently running both a Gitlab instance (v6.7.3) and a Ghost-powered personal blog on a DigitalOcean VPS with 512mb (lowest end), served by nginx. Until just recently I was unable to run both, ...
0
votes
0answers
30 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
2answers
42 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 ...
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 ...
0
votes
1answer
34 views

Nginx proxying http to https with client certificate

We have an application that is not client-certificate aware and must consume a client-certificate authenticated web-service. To fix this, we're trying to use Nginx to reverse proxy a local (http) url ...
1
vote
1answer
45 views

Does whitespace matter in nginx conf files?

I have an nginx conf file that due to using environment variables, I have a shell script echo, this file I refer to as nginx.conf.template, then I place the echoed result into the actual nginx.conf, ...
0
votes
1answer
1k views

How to increase nginx connections

I am facing the problem of nginx max connection issues. I am not able to increase max active connections(520) made by nginx. Some time it is using whole writing (516) operation connections. and due to ...
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 ...
6
votes
3answers
7k views

Different nginx rules based on referrer

I'm using WordPress with WP Super Cache. I want visitors who come from Google (That inlcudes all country specific referrers like google.co.in, google.co.uk and etc.) to see uncached contents. There ...
2
votes
1answer
2k views

nginx regex characters that require quoting?

So I was configuring nginx today and I hit a weird problem. I was trying to match a location like this: location ~ ^/([0-9]+)/(.*) { # do proxy redirects } ...for URLs like ...
-1
votes
1answer
40 views

Upload a large video [on hold]

I have bought a dedicated server from DigitalOcean and built a website using WordPress. I have a video of 822Mb; I want to add this video to a page of my website such that visitors can directly watch ...
0
votes
0answers
11 views

Forwarding Requests through nginx

I'm going to use serve my static files such as html, js, css files in nginx web server. Also, there are some REST services on a Wildfly web server on port of 8080. My nginx's configuration file is: ...
-1
votes
0answers
32 views

How to rewrite a domain name in nginx [on hold]

I am using Nginx as a reverse proxy. I am trying to configure the server such that any request ending with .net will be redirected to net- For example: example.net should redirect to net-example.com. ...
0
votes
1answer
37 views

Configuring two different application server in one nginx?

I have two different app servers one is my custom application and other is CRM. My custom app will get request and it will request crm server for some data and at the end server the customer. I have ...