公司业务需要,要求尽快配置一个内网wiki环境,比较之后选择了dokuwiki,记录下配置过程,以备后查。
1、安装后的安全配置
安装后,可以将conf、bin、data、inc移至另外的目录,然后ln -s sourelist dstlist即可。
apache下使用如下方式之一,做一些基本的安全配置:
源文:
Deny Directory Access in Apache
The simplest way is to enable .htaccess support in your Apache configuration. Please see the Apache .htaccess Tutorial.
DokuWiki already comes with correctly configured .htaccess files. The contents of a .htaccess file to block all access to the directory it is in should be as
follows:
order allow,deny
deny from all
The other way is to use LocationMatch directive inside VirtualHost definition - it's a little bit more efficient than .htaccess. Just below Directory
directive add:
<LocationMatch "/(data|conf|bin|inc)/">
Order allow,deny
Deny from all
Satisfy All
</LocationMatch>
Remark : Using apache2 on a Ubuntu, the .htaccess does not work !
It seems that Apache2 in general, or it might be specifically to Ubuntu, is configured slightly differently than Apache1.x.
In the /etc/apache2/sites-available you need to modify the file default
There you'll find:
NameVirtualHost *
<VirtualHost *>
ServerAdmin
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride none
Order allow,deny
allow from all
</Directory>
Default for AllowOverride in the <Directory /var/www/> is none, should be all
/etc/init.d/apache2 restart to restart apache and your .htaccess files should now work.
(See http://ubuntuforums.org/showthread.php?t=47669 for the full thread)
2、设置简洁连接。
高级设置====使用更整洁的 URL,设置为”Dokuwiki 内部控制”即可生效。
而且居然是没有内部编码的:汉字可以直接贴上来:
http://wiki.xxx.com/doku.php/connect_list#中文
3、上传文件类型
上传文件类型的设置在dokuwiki/conf/mime.conf中配置。
新版(笔者安装的为2011-05-25的stable)已经支持.docx .xlsx等文件类型。
旧版不支持的话,请在mime.conf中添加如下内容:
docx !application/vnd.openxmlformats-officedocument.wordprocessingml.document
xlsx !application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
pptx !application/vnd.openxmlformats-officedocument.presentationml.presentation
默认不支持html、htm、txt、conf、xml、csv等,如需支持去掉前面的注释即可。
#html text/html
#htm text/html
#txt text/plain
#conf text/plain
#xml text/xml
#csv text/csv
4、修改上传附件大小
在php.ini中找到upload_max_filesize,其默认值是2M,根据需要自行修改。
5、模板推荐
vector 特点:左侧导航中文
monobook 特点:友好url支持