标签:
更改两个文件
一、apache\conf\extra\httpd-vhosts.conf
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
<VirtualHost *:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "D:/xampp/htdocs/ceshi.com"
ServerName ceshi.com
ServerAlias www.ceshi.com
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" combined
</VirtualHost>
二、C:\Windows\System32\drivers\etc\hosts
127.0.0.1 www.ceshi.com
这样就可以通过www.ceshi.com访问本地项目
标签:
原文地址:http://www.cnblogs.com/dzlffmx/p/4193393.html