dokuwiki搭建
概述
為了公司內部使用,會在公司內部搭建一個wiki作為知識庫。
搭建方法
因為官方版本獨佔了apache2的預設配置檔案,對於後期擴充套件有很大障礙,於是我把dokuwiki作為apache2的一個vhost使用
1.配置虛擬主機
在/etc/apache2/sites-available建立dokuwiki配置檔案,由於用的版本是Server version: Apache/2.4.7 (Ubuntu),所以配置檔案必須以.conf結尾,所以名字就是dokuwiki.conf
內容大致如下:
# Example Apache virtual host configuration <VirtualHost *:8088> ServerAdmin webmaster@localhost ServerNamewiki.localhost.com DocumentRoot /var/www/html/dokuwiki # Opération #DENY3M #Include/etc/apache2/deny3m/deny3m.conf ErrorLog ${APACHE_LOG_DIR}/dokuwiki-error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on <Directory /var/www/html/dokuwiki> AllowOverride All allow from all </Directory> <LocationMatch "/(data|conf|bin|inc)/"> order allow,deny deny from all satisfy all </LocationMatch> # Gérer les anciens chemins en /dokuwiki </VirtualHost>
2.新增port
修改 /etc/apache2/ports.conf 檔案新增一個新的監聽埠
Listen 80 Listen 8088
將下載的dokuwiki壓縮包解壓到/var/www/html/,並重命名資料夾
3.改所屬組
chown -R www-data:www-data dokuwiki/
4.使用 a2ensite 命令啟用虛擬主機,使用 a2dissite 命令停用虛擬主機
a2ensite dokuwiki.conf
5.重啟apache2
service apache2 restart