# Configuring nginx for white label

**URL:** <https://www.ruby-forum.com/t/configuring-nginx-for-white-label/224623>\
**Category:** NGINX\
**Created:** [November 19, 2012, 5:03pm UTC](https://www.ruby-forum.com/t/configuring-nginx-for-white-label/224623 "2012-11-19T17:03:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 19, 2012, 5:03pm UTC](https://www.ruby-forum.com/t/configuring-nginx-for-white-label/224623/1 "2012-11-19T17:03:37Z")

</div>

Hi all,

I am trying to configure a “white-label” set up where the reseller  
supplies only the files he needs to over-ride the basic installation - a  
few images, perhaps a css file and an occasional .php file. All files he  
does NOT supply should be served from a master location.

Say master is hosted in /var/www/master/htdocs  
and reseller is hosted in /var/www/reseller/htdocs

I have tried  
try\_files $uri, $uri/ …/…/master/htdocs/$uri  
…/…/master/htdocs/$uri/ =404;

This was attractive because I only named the reseller once in the server  
line. Sadly it doesn’t pick up the master files even though all  
directories have read permissions.

I have tried jumping locations…  
root /var/www/reseller/htdocs;  
try\_files $uri $uri/ @master  
location @master {  
root /var/www/master/htdocs;  
try\_files $uri $uri/ @reseller;  
}  
location @reseller {  
root /var/www/reseller\_X/htdocs;  
try\_files /index.php?$args;  
}

Oh so near. This served static master files OK, but not master php  
files! I never got index.php called. Missing files  
and master php files produced “No input file specified.”

What is the correct approach for what I want to do?

Thanks

Ian
