一、配置 DNS server ,可以正确解析出域名!
我使用的IP为:192.168.0.106
解析的测试域名分别为: wiki.test.com osslab.test.com
二、复制一份dekiwiki的主目录到自定义的目录下
# cd /home
# mkdir dekiwiki
# chown dekiwiki:apache dekiwiki
# cp -ap /var/www/dekiwiki/* /home/dekiwiki
三、按照下列修改dekiwiki配置文件(红色部分需要修改,其他默认即可)
# vi /etc/httpd/conf.d/deki-apache.conf
<VirtualHost *>
ServerName wiki.test.com
ServerAlias wiki
ErrorLog /var/log/httpd/error-dekiwiki.log
CustomLog /var/log/httpd/access-dekiwiki.log common
DocumentRoot "/var/www/dekiwiki"
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
</VirtualHost>
<Directory "/var/www/dekiwiki">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *>
ServerName osslab.test.com
ServerAlias osslab
ErrorLog /var/log/httpd/error-dekiwiki.log
CustomLog /var/log/httpd/access-dekiwiki.log common
DocumentRoot "/home/dekiwiki"
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
</VirtualHost>
<Directory "/home/dekiwiki">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
四、启动服务
# service httpd start
# service mysqld start
# /etc/init.d/dekiwiki start
现在使用 http://wiki.test.com http://osslab.test.com 都可以访问到,但是查看了database后,发现双wiki的database为同一个,无法分开,只能是起到一个网站冗余的效果!
我现在需要在一台主机上面装双wiki,并且是使用不同的数据库,查看了wiki的配置文件后,发现要datebase与mindtouch.deki.startup.xml檔案相关联,但是mindtouch.deki.startup.xml檔案则需要手動進行設定