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

2
votes
2answers
6 views

Drain connections on restart of NGINX process?

I'm using NGINX 1.8.1 on CentOS 6 and 7. During our deploys, it is required that NGINX is stopped, the deploy executes, and NGINX starts again. Unfortunately, NGINX during a stop seems to just 500 all ...
0
votes
0answers
4 views

Git Http Backend - how to make same repo public for clone and authorized for push?

Hosting git repo on git-http-backend with Nginx+uwsgi. Nginx used auth_basic_user_file directive for authentication. I can successfully push and clone from this repo, but every time need to enter user ...
1
vote
0answers
3 views

Latest GitHub source not being deployed properly by Opsworks

I have an Opsworks Rails Layer (nginx/unicorn) instance that has been running for a while, and I have successfully deployed my rails app to it many times directly from GitHub. Yesterday, I started ...
0
votes
1answer
17 views

Nginx always searches index.php in the wrong directory

I have a web root directory pointing to /var/www/html. I have several subfolders in /var/www/html where I host different projects. Example: /var/www/html/chatserver When I try to access http:// ...
1
vote
1answer
1k views

RTMP Proxy Server

I have an application which uses both HTTP (content data) and RTMP (video streams) for communications. An nginx server is configured for load balancing and proxying incoming client requests. It works ...
0
votes
0answers
33 views

SSL Error when pressing CTRL+F5 (overwriting cache) in Firefox

I have an nginx server which fails to correctly delive ssl, when a user presses ctrl+shift+r or ctrl+F5. These shortcuts reload the page and bypass the browser cache. It seems to work in Chrome and ...
0
votes
0answers
11 views

NGINX proxy keeps losing connection to uWSGI backend

I've got a Docker NGINX host serving static web pages, and proxying to a Docker uWSGI backend. After a couple errors, I start getting 500s from the website. Looking at the NGINX logs, I see: ...
2
votes
0answers
26 views

Debian jessie nginx with openssl 1.0.2

I am running debian jessie on my server and recently upgraded to new nginx web server with http/2 support (nginx 1.10). As today, it works great and webserver is delivering content with http2 ...
4
votes
1answer
1k views

Nginx, memcached and cakephp: memcached module always misses cache

I've got a simple nginx configuration; server{ servername localhost; root /var/www/webroot; location / { set_md5 $memcached_key $uri; index index.php index.html; try_files $uri ...
2
votes
2answers
6k views

CentOS 6.6 with Nginx 1.6.2 - Suddenly can't restart nginx - nginx: [emerg] open() “/usr/share/nginx/on” failed (13: Permission denied)

This is a new install in which nginx previously started and stopped normally. I believe this error arose after enabling server blocks which tested (nginx -t) successfully. I then tried to restart ...
0
votes
2answers
233 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
0answers
30 views

How to forward url parameters from Nginx to my server's API?

I'm trying to create "user only" section and I managed to get this far, but I'm stuck. How can I send the requested url to my api? Here's my Express.js API route, very simple. User visits a link ...
5
votes
1answer
2k views

Why does Nginx's proxy_intercept_errors directive require a rewrite to work properly?

Following is a sample Nginx server configuration. Without the "magical talisman" location block, proxied error content results in an Nginx 404 page rather than the customized error page being served. ...
3
votes
4answers
6k views

nginx Block IP based on URI in one 'location'

There is currently a block of one location / location / { root /var/www/docs; proxy_pass http://backend; proxy_buffering on; proxy_buffer_size 64k; proxy_buffers ...
0
votes
1answer
28 views

Problems with using NGINX on an SSL-only site

I've configured a website to be 100% SSL, and its on a cPanel server with NGINX. I'm able to get the SSL part to work fine, but the IP address reported for site visitors is the IP address of the ...
1
vote
0answers
18 views

Use postfix through a proxy. How should it be configured?

Postfix by default uses ports 25, 465 and 587. In my configuration, I enabled TLS encryption using the option smtpd_use_tls=yes in postfix's main.cf. This makes all smtp communications encrypted as ...
-1
votes
1answer
39 views

Configuring OCSP stapling in NGINX

Should I concatenate all certificates(server + intermediates + root) or just(server + intermediates) for ssl_trusted_certificate directive in NGINX.
1
vote
1answer
28 views

redirect EC2 nginx to different domain

I have a website mysubdomain.mydomain.com that needs to be redirected to myotherdomain.com/coming-soon The application, which has existing users, needs to be redirected to another site on a ...
0
votes
1answer
523 views

502 bad gateway when trying to log out through nginx reverse proxy

When I try to log out my php application, the nginx reverse proxy throws a 502 bad gateway error. The error log shows this error: [error] 20284#0: *1 upstream sent too big header while reading ...
0
votes
1answer
30 views

Mysql DB can't establish connection

I run a viral news site, it's running on a 30 dollar digitalocean vps currently, with wordpress and apache. The other day my post went viral and i was getting 250 pageviews per minute. After a ...
1
vote
3answers
3k views

Varnish 3.0.2 to Apache2 sometimes return error 503

Hey guys I hope you can help me out here. I have an Ngingx parsing http and https to a varnish cache(3.0.2). From the varnish it is sent to apache2. Now I have for some time been tracking some ...
0
votes
0answers
33 views

How can I install nginx 1.9.5 on debian jessie?

I added theses lines to the "/etc/apt/sources.list": deb http://nginx.org/packages/mainline/debian/ jessie nginx deb-src http://nginx.org/packages/mainline/debian/ jessie nginx After that I've ...
-1
votes
0answers
20 views

Slow server response in using Nginx + Php FPM [on hold]

I'm using for my wordpress site a VPS with Nginx and PHP-FPM. I didn't knew how to configure so I put inside their confs everything that I thought is good. Because, I'm not an expert I might ruined ...
0
votes
2answers
45 views

nginx wordpress ssl mixed content

I have a wocommerce site for which I am trying to setup an SSL certificate for checkout pages. The HTTP version of the site is working file. Prior to switching to nginx SSL on apache worked fine. ...
1
vote
0answers
22 views

Cant get socket.io to work on Elastic Beanstalk

I currently have an Elastic Beanstalk instance running with no load balancing, in future I'll be using Elastic Load Balancer. My EB Instance is sitting behind an nginx proxy, I'm aware to fix this ...
3
votes
1answer
1k views

Specify a SHA-1 or SHA-2 cert depending on client abilities

With SHA1 certs being deprecated by major browsers it seems wise to get a SHA2 signed cert. But in doing so you will be locking out IE6 users. While for most people this won't be an issue in some ...
0
votes
1answer
34 views

Nginx server_name redirect

I am doing an mobile page redirect for my website,it success, but unfortunately it stay at the same domain name, exmaple: when i go johnson.com by phone it should go to m.johnson.com(Yes, this is ...
0
votes
4answers
1k 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
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 ...
1
vote
4answers
2k views

Nginx or php-fpm error?

I found my vps nginx error log like this 2013/04/06 03:28:04 [alert] 8557#0: mmap(MAP_ANON|MAP_SHARED, 5242880000) failed (12: Cannot allocate memory) 2013/04/06 04:05:30 [alert] 10299#0: ...
1
vote
0answers
16 views

Nginx rewrite - remove substring at the end of URL

I have a faulty plugin that is generating URLs with /mobile at the end. I am trying to fix the plugin but in the meantime I would like to write a Nginx rewrite rule to redirect as shown below: ...
1
vote
1answer
41 views

Nginx user uploaded SSL Certificates

I'm wondering what's the best way to let users upload their SSL certificates. I have a multitenant application based on rails/passenger/nginx and I need each user to use his own domain with his SSL ...
1
vote
1answer
123 views

Disable SSL on an nginx server block listening on port 443

Is it possible to setup a server, which while listening on port 443 does NOT use it? Something like that: server { listen 443; server_name _; ssl off; return 444; } The problem with the ...
0
votes
0answers
18 views

nginx sub uri on another root

I'm stuck on an nginx rule : I have to use Nginx on our monitoring server, it uses Zabbix. I succesfully configured nginx for zabbix so that I can access monit.domain.com and it sends me to zabbix). ...
1
vote
1answer
383 views

Nginx daemon doesn't want to stop on Ubuntu

I've got an Ubuntu 11.04 i386 server with Nginx 1.0.11. I'm also using this init.d script - the only one I've found. The server starts up well, but each time I'm trying to stop or restart it, the ...
3
votes
2answers
8k views

nginx : no live upstreams while connecting to upstream

502 bad gateway error displayed when switching between site pages and some times on home page but not for the first request on the home page it is only when another page redirect to it. and it happens ...
31
votes
4answers
62k views

Nginx enable site command

We all know how to enable a website using apache on linux. I'm pretty sure that we all agree on using the a2ensite command. Unfortunately there is no default equivalent command comes with Nginx, but ...
1
vote
1answer
28 views

Use of “sub_filter” in “IF” block under nginx config

I have nginx as reverse_proxy server for multiple applications running behind on various application servers. I want induce specific html/script into response content for set pre-registered urls. ...
4
votes
3answers
968 views

Nginx - what is the meaning to define `burst` if there is the `nodelay` option

In the Nginx configuration, when you want to limit the request processing rate by using the limit_req_zone / limit_req instructions, I don't really understand the use of the nodelay option. In my ...
1
vote
2answers
31 views

nginx : enabling gzip compression based on hostname

I have a single machine running nginx serving http traffic for multiple domains(using same Lua codebase). For some of the domains I would like to enable gzip compression. Is it possible to enable gzip ...
0
votes
0answers
52 views

nginx PHP files downloading instead of executing

I'm trying to achieve following thing. I've main website under domain root directory. It's working fine. i.e PHP files are executed. After some time I've added "auth" directory with basic HTTP ...
0
votes
1answer
1k views

Nginx rewrite rule - appending language prefix

I have a site spanish.com. I want users to load pages under "es" directory, i.e., spanish.com/es. For example: Users should see: spanish.com but spanish.com/es is loaded Users see ...
-1
votes
0answers
20 views

Nginx redirect when no server block for subdomain

I have nginx setup as a reverse proxy for my node js app. I also have setup a wildcard subdomains to redirect all subdomain traffic to the same server when I proxy requests to the ip associated with ...
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 ...
2
votes
1answer
376 views

Website not loading static files when NGINX has static cache content enabled

I have a VPS running CentOS with NGINX/PHP-FPM. Everything works fine, except when I add the following lines to enable the static cache content. If I do, the page does not load those files specified ...
0
votes
3answers
60 views

restart php5-fpm from php script

Ok, this is a tricky one (I think) I need to reload php5-fpm from a php script The obvious issue is that once the reload command is executed, the current script is disturbed, I tried to delay the ...
22
votes
4answers
29k views

Installing optional Nginx modules with apt-get

I currently have Nginx installed via the instructions on the Nginx site: nginx=stable sudo su - add-apt-repository ppa:nginx/$nginx apt-get update apt-get install I have configured Nginx and it ...
1
vote
1answer
1k views

Ubuntu 12.04 open port 80 inside VLAN

I have an nginx server running on ubuntu 12.04 that serves http through port 80 and https through port 443. Everything works fine if I access it from the same computer via localhost, 127.0.0.1 or the ...
2
votes
1answer
1k views

How to setup Proxy Cache with Nginx and Passenger

I use Nginx and Passenger for my rails application. I want to use proxy cache to cache my pages. However, every request go direct to my rails application. I don't know what wrong with my ...
6
votes
5answers
3k views

How can I stop nginx from retrying PUT or POST requests on upstream server timeout?

We are using nginx to load balance requests to our application. We have found that nginx switches to a different upstream server when requests time out (good). However it does this for PUT and POST ...