I'm trying to get virtual hosts up and running on my Ubuntu laptop that has 12.10 installed. I'm running Apache2, and I enabled the virtual hosting module.

When I go to, I'm able to get the default page. When I go to example.local, I just get the search engine results, instead of the "hey, you're seeing this" page I set up in that directory (/var/www/example.local).

I even made sure I have only one "NameVirtualHost *:80" variable active. Checking error.log, nothing obvious seems to jump out as being amiss. here's what I have in the respective files:


ServerName example.local ServerAdmin webmaster@localhost

DocumentRoot /var/www/example.local
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory /var/www/example.local>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined


NameVirtualHost *:80 Listen 80

hosts   localhost   KitaiGorod       example.local

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
  • Okay . . . when I do this: w3m example.local, I get the customized content that I had put into the index.html file. So, it seems to be up and running through terminal, just not on the web browser. I'm puzzled . . .
    – lolajl
    Commented Oct 25, 2012 at 16:51
  • Well, mysteriously, it's now working in my browser once I entered this into the browser window: example.local Case closed. Really odd, though.
    – lolajl
    Commented Oct 25, 2012 at 17:30

1 Answer 1


It seems example.local is a simple file in /var/www, not a new virtual host. Check the reference to vhost here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .