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
648 views

Redirect only home page

I need to redirect only http://shop.test.com to http://www.test.com/fedex-orders/ Just homepage. Nothing else. ie http://shop.test.com/?page=blog should NOT redirect.
1
vote
1answer
4k views

gitlab installation: using localhost

I am following this instruction to install gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md All is well until #7. nginx. I have problem with this specific ...
0
votes
1answer
729 views

Multiple sites with Varnish and nginx on the same server

UPDATE: I found a typo in my config. I forgot one of the ports to change over. The issue is resolved. Originally I had a server with nginx running multiple websites. I added Varnish in front to be on ...
0
votes
1answer
521 views

nginx + php-fpm “connect() failed” errors in logs, no visible impact

I'm trying to figure out why I have so many of these error logs: [error] 1545#0: *713626 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: ...
0
votes
2answers
532 views

Nginx location exact match matches beyond arguement

In my nginx config, I would like to catch /foo/ and do a rewrite using location, but for it to ignore /foo/anything-else I've tried: location = /foo-bar/ { and location ~ ^/foo-bar/$ { and ...
2
votes
3answers
579 views

Is this a sensible way to scale Nginx for static content serving?

I need to set up some VPSs for serving static content (many small files). I plan on using Nginx for this, and would like to set it up so that we are able to scale out relatively easily. The ...
1
vote
1answer
69 views

Nginx: maintenance mode with “is a developer” check

It's much variants described in Internet how to display maintenance page with nginx. But I didn't find the solution to check if user is a developer and not to display maintenance page for developers. ...
1
vote
2answers
272 views

Nginx error log is 96GB in size

Today my server was unresponsive to HTTP requests and it looks like the cause was that nginx went down because when I restarted nginx, it worked again. I wanted to take a look in the error log to see ...
0
votes
2answers
1k views

PHP-FPM Pool, Child Processes and Memory Consumption

In my PHP-FPM configuration I have 3 Pools, the eg: Config is: ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 1 ; ;;;;;;;;;;;;;;;;;;;;;;; [www1] user = www group = www listen = /tmp/php-fpm1.sock; ...
0
votes
1answer
107 views

PHP-FPM as a dedicated application server?

Just wondering in terms of scalability .. do you reckon PHP-FPM should run on a standalone server or works as well if you run it with NginX on the same server?
0
votes
2answers
167 views

Accidently set chown “root” to all my server

I'm running 2 magento apps on my web server and I accidently set "chown -R www-data:www-data *" from the root of the server. Meaning, all the files were owned by the user root. This immediately ...
0
votes
1answer
196 views

Investigating a phishing complaint

UPDATE: Seems it was a fake email, so not really that urgent, but the questions are still valid. So I received an email about a VPS I host (I'm a VPS hosting company, this is a customer VPS) being ...
0
votes
2answers
414 views

separate logs from limit_req_zone in nginx

Here we have piece of current nginx configuration: limit_req_zone $binary_remote_addr zone=one:32m rate=2r/s; limit_req zone=one burst=10; error_page 500 501 502 503 504 =503 /offline.html; location ...
0
votes
1answer
34 views

Nginx redirect within the same server

If I have a server foo.com which has a root directory ~/public_html/foo. For some reasons I want to use the same server config but point the request from foo.com/test/ to ~/public_html/test. Any hints ...
0
votes
1answer
46 views

Redirect feed with nginx

I would like to redirect my feed to a feed service. Using this, I can only redirect mysite.com/feed but not mysite.com/feed/ (notice the slash after feed. if ($http_user_agent !~ ...
1
vote
3answers
862 views

Where to put project files with nginx

Looking at the /usr/share/doc/nginx/README.Debian file, we can see this warning: README for Debian ----------------- Files under /var/www/ are not supported as per Debian Policy. Please see: ...
0
votes
1answer
2k views

How to resolve the gunicorn critical worker timeout error?

I have used nginx and gunicorn to host my website in two servers, Both server have same versions of packages and website is successfully hosted, But in one of my server gunicorn always gets timeout ...
0
votes
1answer
160 views

Is there a way to make nginx only ask for a PEM pass phrase a single time?

I use nginx as a simple SSL proxy and have 7 virtual hosts configured (plus a default host). Interestingly, whenever I restart the server, I have to enter the PEM pass phrase for my private key 20(!) ...
0
votes
1answer
19 views

Ngnix Seperation Of SubFolder Sites

So let's say I have a site at example.com. I would like to setup another site at example.com/somewhere else. Can Ngnix be configured so these sites are not connected in anyway? Meaning, a session ...
0
votes
1answer
67 views

Nginx proxy by alphabet

I have three VPS servers, each one has its own ip address. The Server One is supposed to be a proxy server, which will be listen for domain.com and *.domain.com. Is it possible to configure that ...
0
votes
2answers
190 views

ngnix startup isse ipv4 & ipv6

I'm trying to get my first nginx server setup, and am having trouble setting up ipv4 and ipv6. I have this in the top of my config file (it's the only server block in the config file): server { ...
1
vote
1answer
1k views

nginx rewrite only specific servername to https

It's about two subdomains. The first one (www) should be accessed via http. The second one (cloud) should be accessed via https. These are the relevant parts of my entries: server { listen ...
1
vote
0answers
102 views

nginx: how to serve files in gzip format when client accepts “Accept-Encoding: gzip” and inflated otherwise?

I have a folder full of .gz files and would like to serve them transparently inflated if requested by a client that does not send Accept-Encoding: gzip in the request and as-is (gzip'd) otherwise. I ...
1
vote
1answer
898 views

nginx url rewrite with string substitution

I need to catch if my urls contain a small substr, keep the url as it is and rewrite only that small part, how can I accomplish this? For example: http://foobar.com/foo-bar-substrtocatch-baz ...
-2
votes
3answers
136 views

Nginx not parsing PHP [closed]

So I can't remember what I did, but for some reason I cannot get PHP to be parsed anymore. What would be the basic troubleshooting steps to check on this? I have php5 installed and nginx running but ...
0
votes
1answer
184 views

Convert .htaccess http authorization to nginx

I need to convert the following .htaccess string to nginx config: RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] Can anyone help me? I'm running nginx + php_fpm configuration.
1
vote
1answer
541 views

Error installing nginx with Passenger on Ubuntu 12.10 for Ruby 2.0.0 [closed]

I am attempting to install nginx to run a Rails site (3.2.13) with Passenger (4.0.0.rc5) on Ruby 2.0.0-p0 via RVM. I have successfully installed the Passenger gem, but when running: rvmsudo ...
0
votes
2answers
176 views

PHP scripts time out but regular pages are snappy

I'm having a strange issue with nginx and PHP-FPM. I have a server set up to serve downloads for my website. It's not very beasty, it's only a Celeron G530 and 4GB of RAM, because of this, I'm running ...
0
votes
1answer
554 views

Nginx 504 Time out when zipping/unzipping and moving files

We're getting a 504 time out in Wordpress with a feature we have attached to "publish post" which takes an attacked zip file, unzips it, moves the unzipped files to s3, makes a new Zip and moves that ...
0
votes
2answers
224 views

How can I setup an Nginx load balancer using a GET parameter?

I would like to know if it is possible to balance between two servers using a GET parameter to make decisions. thanks
1
vote
1answer
75 views

Proxy HTTP requests to several machines

I have one service called legacy-service another service called dev-service bunch of HTTP requests coming to the legacy-service Is there any way to proxy HTTP requests to both legacy-service and ...
0
votes
1answer
59 views

Convert rewrite rule from Nginx from Apache 2.2

I am trying to convert this Nginx rule: if ($args ~* ^file=(.*)$) { set $filename $1; add_header Content-Disposition "attachment; filename=$filename"; } so it ...
0
votes
1answer
418 views

nginx “410 gone”

I have this configuration and Nginx only returns 410 gone, any idea on how can I fix this? server { listen 80; server_name static.srk.pre.is; set $rootfolder ...
2
votes
1answer
118 views

Is it possible to have the same URL serve a different website on a different port?

Using NGINX and trying to redirect traffic using the same URL but traveling on another port to a different website. Is this possible: server { listen 80 server_name myurl.com; } server { ...
0
votes
1answer
94 views

nginx not starting with multiple nodejs apps

i have this config in sites-enabled/default upstream domainone.com.ar { server 127.0.0.1:9000; } server { listen 80; server_name www.domainone.com.ar; rewrite ^/(.*) http://domainone.com.ar/$1 ...
5
votes
2answers
1k views

Unxeplainably high disk IO caused by nginx worker processes

I have just setup a ubuntu 12.04.2 LTS server that serves a big number of quite large static files. The configuration is the same as on another machine which works great. The other machine uses Ubuntu ...
2
votes
3answers
2k views

How do I enable PHP’s flush() with nginx+PHP-FPM?

I’m using nginx with PHP-FPM (APC is installed). I need PHP’s flush() to work. Is this possible? Things I’ve tried so far: Disabling all output buffering in php.ini, as well as output compression. ...
0
votes
1answer
58 views

possible to have 2 nginx location block with same matching criteria?

For example, if I want to split my prevent hotlink block from caching definition block, and put them in seperate .conf file to be included latter by main.conf, will nginx only match the first one? ...
2
votes
1answer
347 views

Connection timed out NGINX php-fpm mail()

I am porting a PHP site from an Apache server too a NGINX server. First I will get rid of apache to avoid any problems: # service httpd stop # yum erase httpd* Now I am going to install php-fpm so ...
0
votes
0answers
630 views

How to require client-side SSL certificate only for exern IPs in nginx server configuration?

I would like to configure nginx this way, that only extern page visitors (not 192.169.1.0/24) need to authenticate using client-side SSL certificates. I already found, that extern and intern users ...
1
vote
1answer
655 views

nginx don't log requests of a specific ip adress

I'm trying to don't log requests made from a specific ip address like this: location = / { index index.php; if ( $remote_addr = "spe.ci.fic.ip" ) { access_log off; } } But ...
0
votes
1answer
245 views

Pass on passenger_base_uri to Rails app

We built a Rails app that consists of the following routes: namespace :api do namespace :v1 do resources ... end end That means, all controllers are reachable via ...
0
votes
1answer
1k views

Configuring phpMyAdmin with nginx (Fedora 17) for access at localhost/phpmyadmin

[Tried all answers on Stackoverflow, and searched on google a lot, but none of the configurations worked.] I've installed LEMP server on Fedora using the guide on DigitalOcean ...
0
votes
0answers
179 views

Nginx growth of writing connections

I have a web server: ubuntu nginx+uwsgi+postgresql and a stats server: where munin2 is installed. The nginx app server has nginx-1.2.1 with ngx_pagespeed module installed by compilation, taken from ...
0
votes
1answer
93 views

How respect acept: text/plain with nginx? [duplicate]

In http header there is a field named accept, so client can specify prefered format. How can I configure nginx to return markdown page in case of plain text request and processed via some markdown ...
2
votes
2answers
5k views

Nginx Rewrite Convert Querystring to Path

I whould like this simple rewrite rule: /somefolder/mypage.aspx?myid=4343&tab=overview to be redirected to: /folder/4343/overview/ I looked for some solutions and none actually worked.. I ...
4
votes
1answer
1k views

How to define which SSL certificate nginx sends first with SNI?

I use nginx 1.2.7 with OpenSSL 0.9.8o on Debian Squeeze for about 30 domains. On two of them I enabled SSL which works fine on both. The SSL config is use for both domains: listen 443 ssl; ...
0
votes
1answer
430 views

Do AWS ELB, HAProxy or nginx drop the connection if a backend servers is down?

I wonder which ones of the following load balancers is able to detect an unavailable backend machine, and redirect the connection to another server without dropping the request: nginx AWS Elastic ...
1
vote
1answer
336 views

setup Nginx, uwsgi for RAILS app on non-root location

I've set up and run a RAILS app (graylog2), and bellow config made it worked for root location: server { server_name www.mydomain.com; location / { gzip off; uwsgi_modifier1 ...
1
vote
0answers
753 views

Using SAML authentication within nginx

I want to restrict access to some static content, served using nginx, using an existing SAML 2.0 IdP. (In Apache, this would be done with a module such as mod_mellon or mod_auth_saml) What is the ...