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

来源:互联网 发布:知聊能不能提现 编辑:程序博客网 时间:2024/05/16 23:56

一、.安装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 下的网络路径变为根路径。

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


0 0