httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gob42 <lgo...@free.fr>
Subject [users@httpd] [Apache] Multi-virtual host automatic
Date Thu, 20 Jan 2005 21:17:50 GMT
Hi,

I want to a single configuration for all my virtual hosts on my apache 
webserver.
At this time, i use  one configuration file by domain. In this file, i 
define all the virtual host, one by one, for the domain and the sub-domain.
So each time i add a domain or a sub-domain, i have to reload apache.

I come here from the debian-user list, who told to post here for more help

I want to do something like that :

<VirtualHost *>
  ServerName www.domaine.tld
  ServerAdmin admin@domaine.tld
  ServerAlias domaine.tld
  php_value include_path ".:/home/www/domaine.tld/www/php-include"
  DocumentRoot /home/www/domaine.tld/www/htdocs

  ErrorLog /var/log/apache/domaine.tld/error.log
  CustomLog /var/log/apache/domaine.tld/access.log full

  <directory /home/www/domaine.tld/htdocs>
       php_admin_value open_basedir "/home/www/domaine.tld/www"

       AllowOverride FileInfo AuthConfig Limit Indexes Options
       Options MultiViews SymLinksIfOwnerMatch +Includes +ExecCGI 
-FollowSymLinks

       <Limit GET POST OPTIONS PROPFIND>
               Order allow,deny
               Allow from all
       </Limit>

       <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
               Order deny,allow
               Deny from all
       </Limit>
  </directory>
</VirtualHost>

On the debian list, they told me to do this using % so i obtain this :

<VirtualHost *>
ServerName %0
ServerAdmin postmaster@%2+
ServerAlias %2+
DocumentRoot /home/www/%2+/%1

ErrorLog /var/log/apache/%2+/error.log
CustomLog /var/log/apache/%2+/access.log full

<directory /home/www/%2+>
    php_admin_value open_basedir "/home/www/%2+/%1"

    AllowOverride FileInfo AuthConfig Limit Indexes Options
    Options MultiViews SymLinksIfOwnerMatch +Includes +ExecCGI 
-FollowSymLinks

    <Limit GET POST OPTIONS PROPFIND>
            Order allow,deny
            Allow from all
    </Limit>

    <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Order deny,allow
            Deny from all
    </Limit>
</directory>
</VirtualHost>

But this configuration doesn't work properly, ahum, it doesn't work at 
all ;)
Is there someone  to help me to do a configuration?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message