[warn] NameVirtualHost *:80 has no VirtualHosts
How do I fix this problem?
The NameVirtualHost directive is a required to configure name-based virtual hosts. You need edit your Apache configuration file httpd.conf or apache2.conf, enter:
# vi httpd.conf
Find line that read as follows:
Replace is at follows:
<VirtualHost *>
Save and close the file. Here is the sample config file:
NameVirtualHost *:80
<VirtualHost *:80>
Save and close the file. Finally, restart Apache:
# My Virtual Hosts Config File for two Domains
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@theos.in
DocumentRoot "/usr/local/docs/theos.in"
ServerName www.theos.in
ServerAlias theos.in
ErrorLog "/var/log/theos.in-error_log"
CustomLog "/var/log/theos.in-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/usr/local/docs/nixcraft.com"
ServerName www.nixcraft.com
ServerAlias nixcraft.com
ErrorLog "/var/log/nixcraft.com-error_log"
CustomLog "/var/log/nixcraft.com-access_log" common
</VirtualHost>
# /etc/init.d/apache2 restart
OR
# service httpd restart
No comments:
Post a Comment