您的位置:首页 > 运维架构 > 网站架构

win7 php 配置多个网站

2015-10-26 16:15 513 查看
1、在C:\WINDOWS\system32\drivers\etc目录下,打开Hosts

添加A站和B站的DNS映射,如
127.0.0.1 local.zhengxin.com
127.0.0.1 local.zhengxinnew.com

2、httpd.conf文件

<VirtualHost *:80>
<Directory "D:/Apache+PHP/Apache24/htdocs/zhengxin">
Options -Indexes +includes
Allow from all
AllowOverride All
</Directory>
ServerAdmin admin@localphp.com
DocumentRoot "D:/Apache+PHP/Apache24/htdocs/zhengxin"
ServerName local.zhengxin.com
#ServerAlias *.localphp.com
ErrorLog logs/zhengxin.com-error_log
</VirtualHost>

<VirtualHost *:80>
<Directory "D:/Apache+PHP/Apache24/htdocs/zhengxinnew">
Options -Indexes +includes
Allow from all
AllowOverride All
</Directory>
ServerAdmin admin@localphp.com
DocumentRoot "D:/Apache+PHP/Apache24/htdocs/zhengxinnew"
ServerName local.zhengxinnew.com
#ServerAlias *.localphp.com
ErrorLog logs/zhengxinnew.com-error_log
</VirtualHost>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: