Virtual Host at Apache2
MrKnisely
mrknisely at mrknisely.is-a-geek.org
Sat Jan 7 18:07:16 UTC 2006
Soo-Hyun Choi wrote:
>Hi,
>
>I have a question on <VirtualHost> directives for Apache2.
>
>Current situation:
>My server has one IP address (e.g., 192.168.0.1) and it is associated
>with one domain name (e.g., www.example.com).
>
>Wanted task:
>I would like to have "abc.example.com", "def.example.com", and etc etc
>as well as "www.example.com".
>
>What I did but failed:
>I created /var/www/abc, /var/www/def, etc etc and put necessary files
>under each sub-directories. And I changed apache2.conf file containing
>the below.
>
><VirtualHost *>
> DocumentRoot /var/www/abc
> ServerName abc.example.com
></VirtualHost>
>
><VirtualHost *>
> DocumentRoot /var/www/def
> ServerName def.example.com
></VirtualHost>
>
>
>After all these steps, it is failed to be working. (i.e., if I access
>"http://abc.example.com/, the browser says the page cannot be
>displayed.) Would there somebody let me know how this should be
>changed?
>
>Thank you.
>SH
>
>
>
I've done much like that, only my config is over in my sites-available
and linked in my sites-enabled.
Have you check to see that your DNS is working properly for both of
these domains?
Mike K.
More information about the ubuntu-users
mailing list