Apache虚拟主机的设置

绑定多个域名到一个IP。搞了半天,原来httpd.conf漏了一句:

NameVirtualHost *:80

加在所有<VirtualHost …>的上方。
不过记得只能加一次,不然会有[warn] NameVirtualHost *:80 has no VirtualHosts

Leave a Reply

Your email address will not be published. Required fields are marked *