<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 would letters, numbers and underscores , and is a domain name (e.g. <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> listen 80;</div><div> server_name _;</div><div> server_name_in_redirect off;</div><div> passenger_enabled on;</div><div> passenger_use_global_queue on;</div><div> root /home/customer/sites/$host/public;</div><div><br></div><div> if (!-d $document_root) {</div><div> #site not (yet) configureerd. Serve default</div><div> rewrite (.*) <a href="http://default.customer.tld/">http://default.customer.tld/</a>;</div><div> }</div><div><br></div><div> location / {</div><div> passenger_enabled on;</div><div> index index.html index.htm index.php;</div><div> }</div><div> location ~ .php$ {</div><div> fastcgi_pass 127.0.0.1:9000;</div><div> fastcgi_index index.php;</div><div> include fastcgi_params;</div><div> }</div><div>}</div><div><br></div><div>Regards,</div><div><br></div><div>Frank</div></div></body></html>