Virtual host redirects to localhost in Ubuntu
Posted
by
Salman
on Server Fault
See other posts from Server Fault
or by Salman
Published on 2012-04-07T06:49:53Z
Indexed on
2012/04/08
5:32 UTC
Read the original article
Hit count: 288
I have recently configured Virtual Host in my Ubuntu 11.10. But whatever site i type, it always redirects to the localhost page.
This is my "our-test-site" file:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/zftut/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/zftut/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
and this is my, "etc/hosts" file:
127.0.0.1 localhost
127.0.0.1 our-test-site.local
127.0.0.1 zftut.local
127.0.1.1 System.B System
Now when I try to go for "zftut.local", it redirects me to localhost page, showing me this:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
What am I doing wrong? I refered "this" tutorial for setting up virtual host.
© Server Fault or respective owner