在Apache服務器中建立基於IP地址的虛擬主機.
打開httpd.conf:文件添加如下代碼:
<VirtualHost 192.168.1.82>
ServerAdmin [email protected]
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 [email protected]
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>