ThinkPHP Wamp二级域名配置设置

步骤1:设置config.php(项目使用了独立分组)
‘APP_SUB_DOMAIN_DEPLOY’=>1, // 开启子域名配置
/*子域名配置
*格式如: ‘子域名’=>array(‘分组名/[模块名]’,’var1=a&var2=b’);
*/
‘APP_SUB_DOMAIN_RULES’=>array(
‘###.****.com’=>array(‘Admin/’), // admin域名指向Admin分组
‘###.****.com’=>array(‘Home/’), // test域名指向Home分组
),
步骤2:配置http-vhost.conf文件,文件位置在wamp安装目录下,我的是D:\wamp\bin\apache\Apache2.2.21\conf\extraz
在文件中修改添加如下内容:

ServerAdmin 分组名@###.****.com
DocumentRoot “D:/wamp/www/项目名称”
ServerName ###.****.com
ErrorLog “logs/dummy-host2.example.com-error.log”
CustomLog “logs/dummy-host2.example.com-access.log” common

多少个二级域名则添加修改多少个
步骤3:修改hosts文件文件位置在C:\Windows\System32\drivers\etc文件夹中
在最后添加
127.0.0.1 ###.****.com
步骤4:重启wamp,测试即可

thedarkside

这是一个最好的时代,这是一个最坏的时代。

stay connected

228,480

Fans

21,563

Followers

20,563

Followers

8,125

Subscribers

2,253

Subscribers

10,563

Followers

最新文章

entertainment
Buckingham Palace soil used in Tate exhibit
Oct 13, 2016
Sports
Legendary coach Steve Spurrier was truly
Oct 13, 2016
Technology
Acer reveals all-in-one Windows 10 PC
Oct 13, 2016
entertainment
Revival allows Selena Gomez to shed
Oct 13, 2016
entertainment
Buckingham Palace soil used in Tate exhibit
Oct 13, 2016
Sports
Legendary coach Steve Spurrier was truly
Oct 13, 2016
Technology
Acer reveals all-in-one Windows 10 PC
Oct 13, 2016
entertainment
Revival allows Selena Gomez to shed
Oct 13, 2016