Virtual Hosts Not Working (12.10)

Posted by lolajl on Ask Ubuntu See other posts from Ask Ubuntu or by lolajl
Published on 2012-10-25T15:09:09Z Indexed on 2012/12/08 11:36 UTC
Read the original article Hit count: 116

Filed under:
|

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 12.0.0.1, 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:

example.local

ServerName example.local ServerAdmin webmaster@localhost

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

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

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

ports.conf

NameVirtualHost *:80 Listen 80

hosts

127.0.0.1   localhost
127.0.1.1   KitaiGorod

127.0.0.1       example.local

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

© Ask Ubuntu or respective owner

Related posts about apache

Related posts about virtualhost