Apache的WEB服务器仅有一个ip ,却需要服务多个域名(实际是多个网站的服务)。怎么配置呢:
1:确保站点80端口开放。
# Ensure that Apache listens on port 80
Listen 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
2:httpd.conf修改。
# Virtual hosts
Include conf/extra/httpd-vhosts.conf 去掉前面的注释