VirtualHost configuration
Posted
by Hari
on Stack Overflow
See other posts from Stack Overflow
or by Hari
Published on 2010-04-20T11:00:51Z
Indexed on
2010/04/20
11:03 UTC
Read the original article
Hit count: 222
virtualhost
Hi,
I need to configure two name-based virtual hosts in my ubuntu pc. If I type the address "http://mypage1" in browser, it should display my first customized html page and if I type the address "http://mypage2", it should display my second customized html page. I tried out the following:
1. installed apache
2. created a file mypage1 inside sites-available with the contents as follows:
VirtualHost *:80
ServerName mypage1
ServerAlias http://mypage1
DocumentRoot /var/www/mypage1/html
/VirtualHost
3. created a similar file mypage2 inside sites-available
4. ran the commands "a2ensite mypage1" and "a2ensite mypage2" to generate soft links inside sites-enabled.
5. restarted apache using "sudo /etc/init.d/apache2 restart"
After doing the above steps, when I type mypage1 in firefox, I get dns_unresolved_hostname error.
Kindly help me how to resolve this problem.
© Stack Overflow or respective owner