1.开启……/apache/conf/httpd.conf:
1 # Virtual hosts 2 #Include conf/extra/httpd-vhosts.conf
设置成:
1 # Virtual hosts 2 Include conf/extra/httpd-vhosts.conf
2.设置……\apache\conf\extra\httpd-vhosts.conf(可以设置多个主机)
1 <VirtualHost *:80> 2 DocumentRoot "D:/www/OA/" 3 ServerName OA 4 ErrorLog "logs/oa-error.log" 5 CustomLog "logs/oa-access.log" common 6 </VirtualHost>
3.在C:\Windows\System32\drivers\etc\hosts里面添加如下:
1 127.0.0.1 phpMyAdmin 2 127.0.0.1 OA 3 …………
PHP中虚拟主机的配置
时间: 2024-10-07 17:56:42