Fedora搭dokuwiki的步骤 以apache2.4为例
- 官网下载dokuwiki的包,解压到
/var/www/html/
下 - 修改dokuwiki的权限、拥有者/组 为apache
- 安装PHP
- 在/etc/httpd/conf 创建dokuwiki的配置文件 dokuwiki.conf
<Directory /var/www/html/dokuwiki/> Options +FollowSymLinks require all granted ##VER APACHE2.4 Allow from localhost 127.0.0.1 ::1 <IfModule mod_rewrite.c> # Uncomment to implement server-side URL rewriting # (cf. <http://www.dokuwiki.org/config:userewrite>). # Do *not* mix that with multisite! RewriteEngine on RewriteBase /dokuwiki RewriteRule ^lib - [L] RewriteRule ^doku.php - [L] RewriteRule ^feed.php - [L] RewriteRule ^install.php - [L] RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] RewriteRule ^$ doku.php [L] RewriteRule (.*) doku.php?id=$1 [QSA,L] </IfModule> </Directory> <Directory /var/www/html/dokuwiki/bin> require all granted ##FOR VER APACHE2.4 </Directory> <Directory /var/lib/dokuwiki/data> require all granted ##FOR VER APACHE2.4 </Directory>
- 修改httpd.conf下两个默认目录的AllowOverride为all
- 将dokuwiki的SeLinux的上下文 chcon -t httpd_sys_rw_content_t
/var/www/html/
dokuwiki/ -R - 重启httpd
END