Welcome! Log In Create A New Profile

Advanced

Re: More subdomain mapping (dynamic 'root'?)

Frank Louwers
July 03, 2009 05:36AM
On 01 Jul 2009, at 12:23, miradev wrote:

> I want to be able to map submains and urls to determined locations
> on disk, if they exist.
>
> The URL structure is something like: http://.admin.domain.com/
>
> Where would letters, numbers and underscores , and is a domain
> name (e.g. http://cnn.admin.domain.com/www.cnnminiblog.com)
>

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.

server {
listen 80;
server_name _;
server_name_in_redirect off;
passenger_enabled on;
passenger_use_global_queue on;
root /home/customer/sites/$host/public;

if (!-d $document_root) {
#site not (yet) configureerd. Serve default
rewrite (.*) http://default.customer.tld/;
}

location / {
passenger_enabled on;
index index.html index.htm index.php;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}

Regards,

Frank
Subject Author Posted

More subdomain mapping (dynamic 'root'?)

miradev July 01, 2009 06:23AM

Re: More subdomain mapping (dynamic 'root'?)

miradev July 02, 2009 11:29AM

Re: More subdomain mapping (dynamic 'root'?)

Frank Louwers July 03, 2009 05:36AM

Re: More subdomain mapping (dynamic 'root'?)

miradev July 03, 2009 06:42AM

Re: More subdomain mapping (dynamic 'root'?)

Frank Louwers July 03, 2009 08:56AM

Re: More subdomain mapping (dynamic 'root'?)

miradev July 03, 2009 10:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready