httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From FSA <webmas...@proxy.ro>
Subject Re: [users@httpd] virtual host in apache2
Date Wed, 31 Aug 2005 12:51:02 GMT
no need to put the <VirtualHost ... </VirtualHost>  tag u just make a
directory in your apache2 htdocs (let say /var/www/ ) directory wich u
will name after your virtualhost let say "cartous.your-domain.com" and u
have a vhost, if u want to aply some policy on that directory u put in
your conf file:
         <Directory /var/www/cartous.your-domain.com>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                RedirectMatch ^/$ /apache2-default/
         </Directory>
should be fine

Bernard chan wrote:
> 1) I  edited /etc/apache2/sites-available/default
> 
> NameVirtualHost *:80
> <VirtualHost _default_ *:80 >
>         ServerName roadtoy.com
>         DocumentRoot /var/www/roadtoy
>         <Directory /var/www/roadtoy>
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 RedirectMatch ^/$ /apache2-default/
>         </Directory>
> </VirtualHost>
> 
> <VirtualHost _cartous_ *:80 >
>         ServerName cartous.com
>         DocumentRoot /var/www/cartous
>         <Directory /var/www/cartous>
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 RedirectMatch ^/$ /apache2-default/
>         </Directory>
> </VirtualHost>
> 
> <VirtualHost _kaimei_ *:80 >
>         ServerName kaimei.com
>         DocumentRoot /var/www/kaimei
>         <Directory /var/www/kaimei>
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 RedirectMatch ^/$ /apache2-default/
>         </Directory>
> </VirtualHost>
> 
> 2) when   
>               /etc/init.d/apache2 reload
> Resultcame out:-
> Reloading web server config...[Wed Aug 31 19:41:58 2005] [error] (EAI
> 2)Name or service not known: Cannot resolve host name _cartous_ ---
> ignoring!
> [Wed Aug 31 19:41:58 2005] [error] (EAI 2)Name or service not known:
> Cannot resolve host name _kaimei_ --- ignoring!
> done.
> 
> 3) If there is only one "_default_", how to define next for
> cartous.com, & next for kaimei.com?
> 
> 4) I also tried
> ...
> <VirtualHost cartous *:80 >
> ...
> <VirtualHost kaimei *:80 >
> 
> It still doesn't work, 
> 
> Thanx,
> 
> 
> On 8/31/05, Davide Bianchi <davide@onlyforfun.net> wrote:
> 
>>Bernard chan wrote:
>>
>>>1) I edited /etc/apache2/sites-available/default as below:-
>>>
>>><VirtualHost _default_ *:80>
>>><VirtualHost _default_ *:80>
>>
>>You can have only ONE _default_ VHost. By definition the 'default'
>>site is the one used when, for some reason, the server can't figure
>>out which site is requested.
>>
>>
>>>4) I saw some email reply from your site, it shows
>>><VirtualHost _default_*:80>
>>>   why we need to put "_" at the both ends of default?
>>
>>Because that's the way to do it.
>>
>>Davide
>>
>>--
>>Virus error:
>>A virus has been activated in a DOS session. The virus, however,
>>requires Windows. All tasks will automatically be closed and the virus
>>will be activated again.
>>
>>---------------------------------------------------------------------
>>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
>>
>>
> 
> 
> ---------------------------------------------------------------------
> 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