一、配置 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檔案則需要手動進行設定