在Apache服务器中建立基于IP地址的虚拟主机.
打开httpd.conf:文件添加如下代码:
<VirtualHost 192.168.1.82>
ServerAdmin manbuzhe0301@sina.com
DocumentRoot "C:/Program Files/Apache Group/Apache2/lyw"
ServerName 192.168.1.82
ErrorLog logs/vh82
#CustomLog logs/dummy-host.example.com-aclearcase/" target="_blank" >ccess_log common
</VirtualHost>
<VirtualHost 192.168.1.83>
ServerAdmin manbuzhe0301@sina.com
DocumentRoot "C:/Program Files/Apache Group/Apache2/test"
ServerName 192.168.1.83
ErrorLog logs/vh83
#CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>