having difficulties setting multiple domains
when I sudo a2ensite example2, it doesn't load regardless of whether exampe1 is enabled or disabled...and of course takes down example1 with itself . Here are the two files(example2 is a based on example1)
in sites-available I have example1 file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example1.com
ServerAlias example1.com
DocumentRoot /var/www/example1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/example1/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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 /home/ubuntu/www/logs/example1/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/ubuntu/www/logs/example1/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
and example2 file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example2.com
ServerAlias example2.com
DocumentRoot /var/www/example2
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/example2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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 /home/ubuntu/www/logs/example2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/ubuntu/www/logs/example2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
I got
NameVirtualHost *:80
in ports.conf
What am I missing?