Welcome! Log In Create A New Profile

Advanced

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

July 03, 2009 06:42AM
Frank Louwers Wrote:
-------------------------------------------------------
>
> 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.
>
> [code]
> 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;
> }
> }
> [/code]

You are building one config file per client - you have '/home/customer/sites/' hard coded? I'm confused, sorry.

With my example (http://cnn.admin.domain.com/www.cnnminiblog.com) I would end up in
/home/customer/sites/cnn.admin.domain.com/public/www.cnnminiblog.com

I'd like the public folder inside the domain, so like this:
/home/cnn/sites/www.cnnminiblog.com/public
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: 128
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready