0
votes
2answers
46 views

Nginx : rewrite request for 'p.test-prd.com.local' to 'www.test.com'

For various reasons, we follow an internal DNS scheme where the internal test site for 'www.test.com' would be 'p.test-tst.com.local'. I won't go into the details why we ended up with the scheme we're ...
0
votes
1answer
38 views

NGINX Configuration issue

I have a issue with my nginx configuration. The problem is that it always use the proxy conf it never use the beta.node365-p.se conf. I want that if the requested domain is beta.node365-p.se the ...
0
votes
1answer
75 views

NGINX Proxy Pass to NodeJS App: Returning 502 error

I'm trying to setup NGINX as the frontend of my NodeJS app, which is live on 127.0.0.1:3000, but i can't resolve this 502 error. NGINX is locally reachable at http://55.55.55.5/ or http://dev.example ...
1
vote
1answer
42 views

Nginx config to preventing non-browser requests to domain/IP

Having recently installed django 1.6 on a server hosting several django based sites, I'm getting a lot of errors for "ERROR: Invalid HTTP_HOST header". This is a known 'feature'. The problem is that ...
0
votes
0answers
22 views

Nginx: Same configuration, one more domain

I'm pointing a sub-domain at a specific sub-directory on my server. I am familiar with creating additional configuration files and copying them into sites-enabled/ but let's say I would like to do it ...
1
vote
1answer
67 views

Nginx and Django use www-prefixed domain

Trying to understand how to force www. in my domain and redirect anything like ww.example.com or test.example.com -> www.example.com Everything works fine when I go to www.example.com or example.com, ...
0
votes
1answer
82 views

Moving Zend Framework 2 from apache to nginx

I would like to move site that uses Zend Framework 2 from Apache to Nginx. The problem is that site have 6 modules, and apache handles it by aliases defined in httpd-vhosts.conf, #httpd-vhosts.conf ...
0
votes
1answer
194 views

Nginx magento configuration returns 404 but loads html

over the last couple of days I've been undertaking the task of moving our Magento site from shared hosting to a VPS. The VPS is using Nginx with php-fpm. Note Currently we're also having issues with ...
0
votes
2answers
95 views

Nginx + Apache mod_wsgi, troubles understanding how to configure servers

I've been trying for too long to set up a development environment on my Ubuntu 12.04. My intention is to set up everything as I'd have to do later in a production environment, so I followed this ...
-1
votes
1answer
26 views

Nginx ignores my second server directive

I installed nginx via apt-get install nginx on ubuntu 14.04. As such, the default setup includes configs from the directory /etc/nginx/conf.d/ include /etc/nginx/conf.d/*.conf; In my conf.d folder ...
1
vote
1answer
52 views

Cannot change default root location

I have the following configuration file: # /etc/nginx/nginx.conif # vim: ts=4 user nginx; worker_processes 1; error_log /var/log/nginx/error.log; #error_log /var/log/nginx/error.log ...
0
votes
1answer
58 views

Fastcgi request record is too big

I am running an Nginx server, which requires me to accept URI String containing up to 4mb of data. I have configured nginx to accept the params by setting: /etc/nginx/nginx.conf ...
0
votes
0answers
102 views

Server configuration in production for Django applications

I want to deploy my Django project to production as follows: example.com # redirect to www www.example.com # for dynamic files static.example.com # for static files media.example.com ...
0
votes
1answer
44 views

Restricting multiple directories to same IP ranges

Suppose I have the following in an nginx configuration file: location ^~ /foo/ { allow 1.2.3.4; allow 5.6.7.8; allow 9.10.11.12; … allow 99.100.101.102; deny all; # rest ...
1
vote
1answer
39 views

How do I use NGINX as a frontend for a Legacy (Apache) Webserver [duplicate]

I have an NGINX server setup that is already hosting two applications, and SSL is set up on that NGINX server. Now, I need to setup the NGINX server to be a front-end for a legacy Apache application ...
0
votes
0answers
29 views

Nginx glob in try_files

Is it possible in nginx to do something that is the equivalent of a file path glob in try_files? server { try_files /var/www/*/assets/$uri; } That is, if /var/www/ contained site_a and site_b, ...
1
vote
1answer
350 views

Nginx Map Directive for multiple variables

I currently use nginx with Magento and I use the map directive to supply the store code like this: map $http_host $magecode { www.store.com retail_store; wholesale.store.com ...
1
vote
3answers
187 views

What is the Ideal value for Worker Processes in Nginx Config?

I have 31GB RAM 8 Core Web Server with current load of 3k per min. Currently worker_processes parameter in nginx config is 4 which as per my understanding means only 4 cores would be used. But when I ...
1
vote
2answers
410 views

Nginx block for multiple domains to redirect all traffic to https?

I have a web server running nginx 1.6 with one IP address and hosting www.domainname.com as well as dev.domainname.com. I'm trying to find a smart way to route all http traffic to https and I want to ...
0
votes
0answers
170 views

Configure Nginx with multiple lxc containers, virtual hosts and subdomains

I want to use multiple (at least 3) lxc containers running Apache2 on port 80. I want to configure Nginx such that www.mydomain.com serves the content on the host machine while sub1.mydomain.com , ...
0
votes
2answers
56 views

NGINX pretty urls: No input file specified

I've been struggling with a NGINX configuration. I've set up a development environment (local laptop) with a configuration supporting search engine friendly (SEF) urls, but the same configuration ...
0
votes
1answer
106 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 ...
2
votes
0answers
13 views

Mechanism to get the current running configuration values in nginx [duplicate]

Trying to find an easy and convenient mechanism to get the current configuration values from a running nginx instance. The ideal solution would be a url that I could point to that would print the ...
0
votes
1answer
67 views

Nginx config with try_files and rewrite : precedence?

Good morning, everybody. Firstly, this question may have been already asked, but I searched ServerFault during about 15 minutes without finding it, so, if it was already asked, please accept my ...
1
vote
0answers
304 views

How Do I Configure Nginx To Communicate with SMTP Server?

I'm an application developer and have little knowledge on sysadmin / server configuration tasks. I have an nginx server communicating to a Flask web application through uWSGI on a VPS. I'm trying to ...
0
votes
1answer
162 views

Load balancing in Nginx with redirect rather than proxy

I want to use Nginx in a bit of an unconventional way. I want to load balance between a few servers, but rather than proxy content for those servers I want to redirect to them. That is, if a ...
0
votes
1answer
119 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
1answer
133 views

configure nginx with 2 locations while 1 answers to specific url request

I appologize for the weird title :) what I have I have two web applications running on the same server (an OSClass installation and the Vanilla Forum). One of them is supposed to be the master of ...
0
votes
1answer
89 views

Which Nginx and which config file is used

I am trying to install Phusion Passenger module for Nginx. There was Nginx installed in /usr/sbin/nginx. The installer gem downloaded Nginx sources and compiled them with Passenger support into ...
1
vote
1answer
357 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
3
votes
0answers
391 views

Understanding the nginx proxy_cache_path directive

proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=myCache:8m max_size=100m inactive=1h; What does the keys_zone=myCache:8m mean? There's not much said to it in the docs: In addition, all ...
0
votes
1answer
48 views

Nginx won't accept my location configuration

I have a single web site configured in nginx with the configuration shown below. When I visit http://mydomain.com/ the index.html file of my default location is displayed. However when I visit ...
0
votes
1answer
236 views

Disable resume download capability in nginx

Is there any way to disable resume download in nginx server? I want to stop resume download capability in from URL example.com/media/ but I have no idea how to do that. Also I've searched through ...
1
vote
1answer
45 views

Deny running scripts in nginx for specific url

I have a media folder on URL example.com/media/ and I want to deny users running scripts in my server. My server app is nginx and in How to deny script execution inside writable directories I couldn't ...
0
votes
1answer
67 views

alias directive with nested location to catch php files - requests for php files giving 404

I have a directory/web app that is located outside of the web root directory of my site. Say the site is here: /var/www/site/htdocs/ And the external app is located here: /var/www/apps/coolapp/ ...
1
vote
1answer
76 views

Optimizing nginx site configuration

First time working with nginx. Due to my limited knowledge of location directive precedence I had to repeat the code at two places (fastcgi). Can I optimize this file and not repeat code? This is my ...
0
votes
0answers
96 views

What is the difference between proxy_buffer and fastcgi_buffer?

I inherited an nginx config and I'm trying to optimise it for security, speed, and/or maintainability by removing rules/directives which are superfluous or not doing anything. With this in mind, ...
0
votes
0answers
123 views

PHP-FPM and NGINX configuration for dedicated server

Recently bought server http://www.hetzner.de/en/hosting/produkte_rootserver/ex60 Installed Ubuntu 13.10, nginx webserver, php-fpm. It's for large auditory website. Now I'm bit confused about PHP-FPM ...
0
votes
1answer
38 views

Disallowing particular subdomain - Nginx

I am having trouble doing something so simple... I have a service on my server that I configured to use a particular hostname which I have mapped with an A record. However I want to return a 403 ...
0
votes
1answer
48 views

nginx serving php script instead of executing

I have a website that was recently migrated from Cold Fusion to Wordpress. To ensure that old links were still valid, our developer wrote a redirect script that translates old URLs into new URLs. I ...
0
votes
1answer
117 views

How do I conditionally add the Access-Control-Allow-Origin header for fonts served through an X-Accel-Redirect in nginx

I am trying to serve some webfonts through a PHP script that tells nginx to do an internal redirect using X-Accel-Redirect. As the script serves many types of files, I only wish to add the ...
3
votes
1answer
605 views

proxy pass based on query parameters in nginx

Is there a way to proxy pass based on query parameters? I need to proxy pass root url request to server A. But, if root url has certain query parameters i need to proxy pass to server B. How can i ...
0
votes
1answer
222 views

Setup Subdomain On Amazon Ec2

On ec2 I have the parent domain e.g. somedomain.com . I want to setup a subdomain on EC2 which is currently hosting somedomain.com - a subdomain like account.somedomain.com somedomain.com is running ...
0
votes
1answer
26 views

Nginx server location configuration

I want the domains example.com/a/1234/asdf, example.com/a/7890/qwer ,..., example.com/a/* to serve a webpage from the same index file, /var/www/foo/bar/index.php My nginx is configed like this: ...
1
vote
0answers
263 views

throttle nginx bandwidth per website

i would like to limit website's bandwidth using Nginx in order to share it among multiple websites like i'm able to do in IIS7. From reading the doc, i found i need to use limit_req_zone inside ...
0
votes
1answer
40 views

Nginx global config inherits from named config?

I've got two nginx configs, one is a global catchall config without a server name set that should handle any request. And i got a second configuration that has a server name set that handles only the ...
0
votes
0answers
297 views

What solutions do I have to enforce memory limit on PHP server?

I would like to enforce memory limit on a folder basis (and have it applied on subfolders) but I don't want the user able to change the memory limit. I know I can disable ini_set and I know I can ...
0
votes
0answers
153 views

Recompiling Nginx 1.4.3 with “--with-http_gzip_static_module” error

I'm trying to enable the 'ngx_http_gzip_static_module' module in Nginx 1.4.3 by adding the --with-http_gzip_static_module to my ./configure configuration. But I recieve the following error when i try ...
1
vote
1answer
309 views

How to setup nginx and a subdomain

i have gitlab installed on my server and it works on all domains eg: git.lars-dev.de, lars-dev.de and *.lars-dev.de how I can run gitlab only on git.lars-dev.de and another subdomain on ...
2
votes
1answer
514 views

What is the difference between using upstream and location for php-fpm?

I've been searching around but couldn't find a straight answer, if someone could please clarify this, would be greatly appreciated, thanks! location ~ \.php$ { try_files $uri = 404; ...