I wish to setup just one virtual host that may dynamically handle all demands in line with the hostname accustomed to can get on. If % might be utilized in a DocumentRoot, this really is most likely precisely what I would like:

<VirtualHost *:80>
    ServerAdmin me@example.com

    DocumentRoot /var/www/live/%{HTTP_HOST}/public
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    <Directory /var/www/live/%{HTTP_HOST}/public>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all

    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn
    ErrorLog /var/www/live/%{HTTP_HOST}/logs/error.log
    CustomLog /var/www/live/%{HTTP_HOST}/logs/access.log combined

...regrettably, % isn't permitted within the DocumentRoot (Warning: DocumentRoot [/var/www/live/%{HTTP_HOST}/public] does not exist). How else can one achieve transpire?

Update: I figured of pointing a catch-all vhost to some single directory and getting b .htaccess use mod_rewrite to dynamically choose the road but (honestly) I am exhausted. I'll try in internet marketing again each morning, but meanwhile, if anybody has plans, I'd like to hear them! Thanks!


Undergo this.