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
0answers
55 views

UWSGI is not creating my socket

So, i'm getting an error because my .sock file is not being created by uwsgi. I'm also running a VB with vagrant. my uwsgi.ini [uwsgi] master = true pidfile = /tmp/uwsgi-%n.pid workers = 12 ...
0
votes
1answer
93 views

Removing the trailing slash from a URL with nginx

I would like the following URLs on my site to be equivalent: /foo/bar /foo/bar/ /foo/bar/index.html and further I would like the second two forms to issue HTTP 301 redirects to the first form. I am ...
0
votes
3answers
236 views

Nginx 502 Bad Gateway when uploading files

I get the following error when I try to upload files to my node.js based web app: 2014/05/20 04:30:20 [error] 31070#0: *5 upstream prematurely closed connection while reading response header from ...
2
votes
1answer
192 views

Having problems setting up SSL with Nginx

I'm trying to setup SSL(0.9.8e) using Nginx(1.2.3) on a Windows 7 machine. I've generated a self-signed certificate that is needed, so I have a key and a certificate file. When trying to start Nginx ...
0
votes
0answers
18 views

Tell apt-get install to ignore a dependency [duplicate]

I have used Phusion Passenger's Ubuntu repositories to install nginx-extras and passenger on a clean Ubuntu14.04 server, which already had Ruby2.1.1 installed. It worked perfectly. This is how ...
0
votes
1answer
38 views

nginx tries to use named location as real file path?

I'm trying to proxy_pass to an Apache2 instance using a named location, but Nginx tries to find the named location on disk? Nginx Config: root /var/www; location / { try_files $uri @apache =404; ...
2
votes
1answer
50 views

Sending data to statsd does not work in some locations with content_by_lua_file

Before Until recently I used nginx 1.4.x with zebrafishlabs/nginx-statsd as a reverse proxy for openresty (yet, I know, nginx behind nginx - keep reading please) with the following location nginx ...
0
votes
0answers
55 views

Compile nginx from source with PCRE-JIT support on Ubuntu 12.04

The latest version of PCRE library available to Ubuntu 12.04 does not support JIT features (support available in >= 8.20), so any self-compiled nginx on Ubuntu 12.04 will not have pcre-jit. So what ...
0
votes
0answers
35 views

CORS Support Intermittent on Linux Server - NGINX returning 301

I have set up a droplet on DigitalOcean.com and used it to set up a Discourse installation with Docker and I set up CORS support using environmental variables in the app.yml file ...
1
vote
2answers
86 views

nginx point subdomain to subfolder

I want http://blog.domain.com/ to point to http://www.domain.com/blog Just a notice, not to redirect to that location, but just point to it. Also /blog is not a folder. It could be blog.php for ...
1
vote
1answer
64 views

Wordpress - Capistrano Permissions Issues

I'm managing a WordPress install with Capistrano and Composer. Everything is setup and working well, its quite fast on my ngix / php-fpm setup. However, I ran into an issue when attempting to update ...
1
vote
1answer
63 views

Overriding nginx deny rule for a single location block

I have an nginx setup like this, where a server should be mostly private (only certain IP address may use the server), except for one location block which should be publicly available: server { ...
1
vote
1answer
70 views

nginx - specify different index file name for subdirectory

I want the directory index file in the root of my site to be index.html but within a subdirectory /foo I want it to be bar.html i.e. /index.html /foo/bar.html Also I want requests to /foo or ...
0
votes
1answer
47 views

nginx multiple domains always give just the first domain

I need to support multiple domains with one NGINX instance, but always the first listed domain grabs the request. For example I have as below. But when a client requests beta.com, the nginx server ...
0
votes
1answer
38 views

Nginx direct “fgrep” style redirects

I have a bunch of "redirect rules" that I'd like Nginx to do for me that look like this: /news/?p=12312 ---> /news/some/new/url.html /news/?p=12fsd312 ---> /news/some/new/url.html How can I ...
0
votes
1answer
72 views

What is wrong with my Nginx reverse proxy configuration?

I'm trying to set up an nginx server to serve a node.js application at myurl.com, while at the same time serve some php-content from myurl.com/phpapp/ I had the php application working with proxy ...
1
vote
1answer
506 views

Docker + nginx + Php-FPM 502 Bad Gateway

I'm trying to install php-fpm and nginx via docker and I have a problem with nginx which returns me a 502 Bad gateway error, however when I try to go on any HTML file only displays correctly. What ...
1
vote
1answer
64 views

try_files dynamic content type

I was wondering how I could serve different content type for each file. For example I have following nginx configuration: server { listen 80; server_name site.com; location ~ ^/(.*) { ...
2
votes
1answer
74 views

Nginx or Varnish caching with multiple versions of a site

I have a website (https://mediacru.sh) that has a few versions. There's the normal desktop site, the same site with a dark theme, and the mobile site. They all share the same URLs. The theme is ...
1
vote
1answer
43 views

Location directive not working

For my NGINX server I have a virtual server set up just to dish out static content. At the moment I'm trying to set it up so that images have an expiry date. However, when I create a location ...
0
votes
1answer
53 views

Correct way to open ports for fastcgi using iptables

I'm running a server with nginx and fastcgi. I'm using TCP sockets for fastcgi rather than Unix sockets as I've read that this scales better. The fastcgi server is running on fastcgi://127.0.0.1:9000. ...
0
votes
2answers
97 views

D-I-Y VPS Hosting for multiple domains (3) on a single static IP [closed]

and thanks for your input. What I want to do: I want to host some applications Web and email, for example, for myself and two clients on one static IP Address, primarily to learn, and possibly to ...
1
vote
0answers
254 views

Rails app 502 with AWS Elastic Beanstalk running Puma & Nginx

I've been able to successfully get my application running on Beanstalk with Passenger, however I've had no luck with Puma. Whenever I deploy with to a Puma stack I get 502 Errors, my log files ...
1
vote
1answer
23 views

Nginx prevent redirect for a single location

I have a redirect to force https: server { listen 80; server_name example.com; return 301 https://example.com$request_uri; } Works great, but I would like to be able to hit a single ...
0
votes
1answer
51 views

How to disable nginx basic_auth for one location but enable it for the rest of the site

I'm trying to get basic_auth disabled for a specific directory /api/ but still have basic auth for the rest of the site i'm working with. The following is my nginx.conf: server { # base settings ...
1
vote
1answer
60 views

Google-bot trips on a perfectly normal robots.txt, then on a nonexistent robots.txt [duplicate]

I have two domain names pointing to the same virtual server. One of them, http://ilarikaila.com, is a working brochure website I made for a friend. I used the other one, http://teemuleisti.com, to ...
0
votes
1answer
57 views

Login with Google for nginx

I have a nginx server serving protected resources. The last thing I want to do is manage password reset requests, so I was looking at Login with Google. They have examples for PHP, Java, JavaScript ...
0
votes
1answer
53 views

nginx sending incomplete response

Without restart or modification of config, nginx is sending incomplete responses sometimes. Today, I could reproduce well, but still don't know what's wrong or how to fix. I put a 5MB file to the ...
2
votes
1answer
76 views

nginx: understanding the purpose of auth_http (IMAP proxy)

I would like to send IMAP client requests to an IMAP back-end via an nginx proxy. According to the the mail_auth_http module, a directive auth_http has to be used in order to authenticate the clients. ...
0
votes
0answers
32 views

Large volume of VolumeWriteOperations on Amazon Linux EC2 Instance

I have been using a EC2 Amazon linux micro instance as a development/small host server for the past 3 months. I host a couple of domains for me and a friend. I installed the first month only my main ...
0
votes
0answers
26 views

NGINX cache mis-behaving causing the system to go into a frenzy

We're using CentOS/nginx fastcgi_cache to cache requests to PHP files on our server. This file gets accessed very often and also updates very often as such it has 1s cache. Usually when looking ...
0
votes
1answer
92 views

Nginx: route to index.php within alias for specific path component

I'm trying to make nginx route to the index.php within an alias for a specific path. It would be easier to just use subdomains (and add serverblocks with different names), but my project requires this ...
0
votes
0answers
35 views

Can thousands of files in a directory seriously slow down access to unix socket file?

I try to find out why a site has juddering performance problems. It works well most of the time. And for short time a 2-minute delay occurs. I don't see any database problems. Memory consumed looks ...
0
votes
2answers
40 views

Nginx html page still live after deleting it

I'm a bit confused now. I've installed nginx server on centOS. After deleting nginx folder from server nginx default html page is still live although the page was located in the deleted folder. How is ...
0
votes
1answer
60 views

nginx variable port number

I'd like to be able tu run an nginx server on port 8080 when launched by a regular user and on port 80 when launched by root. How can this be parametrized in the config file or by using bash script ?
0
votes
0answers
56 views

nginx - limiting bandwidth usage per server block

In Apache we have some great solutions for limiting the bandwidth usage per vhost, like mod_bandwidth. However, since I started using nginx, I couldn't find a way of limiting and monitoring the ...
0
votes
0answers
18 views

nginx proxy_pass directive acting up on OSX?

I have the following lines in my nginx.conf on my Mac: location /addPat { resolver 8.8.8.8; proxy_pass http://some_url:8080$request_uri; proxy_http_version ...
2
votes
1answer
104 views

Passenger Module Fails On AWS Gem With 'Class Variable Name' Error

Opening Disclaimer: I'm all kinds of newb to the technologies involved in this question. But the Googles, she no yield-a the fruit. I'm trying to deploy a Rails app into production. This app works ...
0
votes
0answers
36 views

Application that works on webrick but fails in passenger

I have a ruby on rails application that starts successfully when I execute rails s -p 3000. But when I deploy it on apache or nginx using passenger, I get this result. The deployment instructions ...
0
votes
2answers
44 views

Setting location of site on nginx

I have a pretty simple problem that I can't solve. I've been searching the web for some time but no good results. I would like to change the default location of the site on my nginx server running on ...
2
votes
0answers
39 views

Nginx & fcgiwrap, logging perl errors to error log

This is similar to this question, which got no responses: How to debug CGI over fcgiwrap/nginx How do I get perl errors to be automatically placed in the nginx error log? Right now, when there is any ...
0
votes
0answers
58 views

How can I set up nginx reverse proxy for any subdomains?

I installed nginx at my Ubuntu VPS for listening any petition at port 80 and doing reverse proxy to different server technologies. This is my configuration file like: server { listen 80; ...
0
votes
0answers
153 views

FFMPEG not executing in Nginx RTMP module

I have an Nginx server with the RTMP module installed. We have an FFMPEG exec line but FFMPEG never runs. It works if ran by hand as in I copy the command into Putty but Nginx wont run it at all. ...
0
votes
0answers
28 views

Getting 403 after moving VPS to different directory

After building my website, I realized that our RAID is setup so that all of the space is allocated in /home/admin/ folder. For that reason I copied all of my websites from /var/www/ to ...
0
votes
1answer
64 views

Lighttpd rewrite rule for Flight PHP microframework

I'm using the Flight PHP microframework, and it includes its' own router, and needs the server to rewrite requests to the index.php file. It features rewrite-rules for both Apache and Nginx but ...
1
vote
2answers
135 views

Nginx: rewriting https:// to http://

I'm trying to get Nginx to rewrite incoming requests to a site my server prefixed with https:// to http:// (this is because a CMS used on this site forces URIs instead of relative paths -- essentially ...
0
votes
0answers
33 views

No longer can get nginx.conf to respect my redirect rules

I want to redirect all sites and subdomains to one https domain name. I'll use https://my-site.com as an example. Previously I had all the redirection working with the following code: server { ...
0
votes
1answer
50 views

In Nginx, how to redirect to another domain, but to also preserve the path AND the subdomain?

So, for instance, I have a domain olddomain.com and newdomain.com Here's how I want requests redirects to work: sub.olddomain.com/hello/world -> sub.newdomain.com/hello/world ...
1
vote
0answers
43 views

Laravel Routes to wrong directory on Nginx

I have just played with Laravel some hours ago and seemed to hit a wall. My nginx document root is usr/share/nginx/html/. Inside this folder I have an index.php (which shows phpinfo();) and a Laravel ...
2
votes
1answer
69 views

Nginx, setup https

I'm trying to setup https on my ubuntu server with NGINX ver 1.4.7 and Phusion Passenger 4.0.41. I created .key and .csr using these two commands sudo openssl genrsa -des3 -out server.key 2048 sudo ...