phpcms v9 一机多域名多网站数据库分开

一、.安装phpcms v9要在安装完在的系统内建两个wwwroot文件夹,对应于不同的网站(www.a.com,www.b.com) 服务器端口为85

二、对apache-conf-httpd.conf文件进行修改

1.Listen *: 85

2.注释掉Main server configuration下的参数设定。

三、对apache-conf-extra-httpd-vhosts.conf下的参数设定

NameVirtualHost *:85

<VirtualHost *:85>

ServerAdmin  XXXX@hotmail.com

DocumentRoot "c:/Pc_webserver/wwwroot"

ServerName www.a.com

<Directory "c:/pc_webserver/wwwroot">

  options Indexs followSymLinks

  AllowOverride Options fileinfo

Order allow,deny

Allow from all

DirectoryIndex index.htm index.html index.php

</Directory>

  Alias /phpmyadmin "c:/pc_webserver/phpmyadmin/"

 <Directory "c:/Pc_webserver/phpmyadmin">

    AllowOverrid Authconfig

  Order allow,deny

 Allow fromall

DirectoryIndex index.htm index.html index.php

</Directory>

  ErrorLog "logs/w.a-error.log"

customLog "logs/w.a-access.log" combined

</VirtualHost>

<VirtualHost *:85>

ServerAdmin  XXXX@hotmail.com

DocumentRoot "c:/Pc_webserver/wwwroot2"

ServerName www.b.com

<Directory "c:/pc_webserver/wwwroot2">

  options Indexs followSymLinks

  AllowOverride Options fileinfo

Order allow,deny

Allow from all

DirectoryIndex index.htm index.html index.php

</Directory>

  Alias /phpmyadmin "c:/pc_webserver/phpmyadmin/"

 <Directory "c:/Pc_webserver/phpmyadmin">

    AllowOverrid Authconfig

  Order allow,deny

 Allow fromall

DirectoryIndex index.htm index.html index.php

</Directory>

  ErrorLog "logs/w.b-error.log"

customLog "logs/w.b-access.log" combined

</VirtualHost>

四、数据库的配置

1.mysql文件夹中将数据库进行复制,改名

2.wwwroot/caches/configs/database.php database进行更改。

五、对于路径进行更改

wwwroot/caches/configs/system.php 下的网络路径变为根路径。

六、重启服务,打网址会进入不同的网站的后台操作界面,进行网站参数的设置。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值