For a free Consultation!
For a free Consultation!
Email: info@canitan.com
Weekdays 8am-6pm
24x7 Support available
Here was the problem: So, upgrading a server (ubuntu 8.10 to 10.04) today caused my virtual server to be lost. In case you don't know, a virtual server is what you use to host multiple sites on a single machine - such as nathan.canitan.com and canyon.canitan.com. I kept getting the error: [warn] NameVirtualHost *:80 has no VirtualHosts
A quick look, and everything seemed ok. The proper config files were in place (/etc/apache2/sites-enabled and /etc/apache2/sites-available). It looks like the ports.conf (/etc/apache2/ports.conf) was changed, but I couldn't find the problem. There was something wrong with my VirtualHost config. Looking thru documentation (see /usr/share/doc/apache2.2-common/), I was enlightened by NEWS.Debian.gz - the VirtualHost settings were changed. Excerpt from the file:
* The directive "NameVirtualHost *" has been changed to "NameVirtualHost
*:80". It has also been moved from sites-available/default to ports.conf.
This allows to ship a proper SSL default virtual host config in
sites-available/default-ssl, but it means that if you use several name
based virtual hosts:
- you will have to change to in your
name based virtual hosts
- you need to add more NameVirtualHost directives if you use other ports
than 80 with name based virtual hosts. You may also have to add these
ports to the default virtual host in /etc/apache2/sites-available/default
(like this: "").
If you prefer to revert to the old setup instead (and don't need the
default-ssl host), just change "NameVirtualHost *:80" back to
"NameVirtualHost *" in ports.conf and "" to
"" in sites-available/default.
Solution:
sudo /etc/init.d/apache2 restartTheme by Danetsoft and Danang Probo Sayekti inspired by Maksimer