2009年4月26日

Solution for "NameVirtualHost *:80 has no VirtualHosts"

Symptom:
## Environment: Apache2.2.9 / Ubuntu 8.10 ##
  1. After add virtual host, I got this error message from the error.log
  2. In the new vhost file:

    ServerName myhost.server.com
  3. In default vhost file:

  4. In ports.conf
    "NameVirtualHost *:80"
Solution:
  1. Make sure all VirtualHost tag match NameVirtualHost. i.e.: *.80
  2. ServerName must match the hostname.
  3. Change the new vhost file:

    ServerName myhost.server.com
  4. In default vhost file:

    ServerName www.server.com
  5. Restart, observe error.log and try to reach the site from browser
OK, Problem solved.

沒有留言:

發佈留言