<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 01 Jul 2009, at 12:23, miradev wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I want to be able to map submains and urls to determined locations on disk, if they exist.<br><br>The URL structure is something like: http://.admin.domain.com/<br><br>Where &nbsp;would letters, numbers and underscores , and &nbsp;is a domain name (e.g. &nbsp;<a href="http://cnn.admin.domain.com/www.cnnminiblog.com)">http://cnn.admin.domain.com/www.cnnminiblog.com)</a><br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>This is what we do for a customer: this allows them to create new domains/projects just by making a new directory. With passenger and php-fpm and this setup, he doesn't need to restart/reload *anything* to start a new website.</div><div><br></div><div><div>server {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;listen &nbsp; &nbsp; &nbsp; 80;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;server_name &nbsp;_;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;server_name_in_redirect off;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;passenger_enabled on;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;passenger_use_global_queue on;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; /home/customer/sites/$host/public;</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (!-d $document_root) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#site not (yet) configureerd. Serve default</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rewrite (.*) <a href="http://default.customer.tld/">http://default.customer.tld/</a>;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;location / {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;passenger_enabled on;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;index index.html index.htm index.php;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;location ~ .php$ {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass 127.0.0.1:9000;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_index index.php;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;include fastcgi_params;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div>}</div><div><br></div><div>Regards,</div><div><br></div><div>Frank</div></div></body></html>