码迷,mamicode.com
首页 > Web开发 > 详细

Fedora搭dokuwiki的步骤 以apache2.4为例

时间:2019-12-14 17:30:57      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:writer   follow   comm   str   multi   权限   上下文   sel   chcon   

  1. 官网下载dokuwiki的包,解压到/var/www/html/
  2. 修改dokuwiki的权限、拥有者/组 为apache
  3. 安装PHP
  4. 在/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>

     

  5. 修改httpd.conf下两个默认目录的AllowOverride为all
  6. 将dokuwiki的SeLinux的上下文 chcon -t httpd_sys_rw_content_t /var/www/html/dokuwiki/ -R
  7. 重启httpd

END

Fedora搭dokuwiki的步骤 以apache2.4为例

标签:writer   follow   comm   str   multi   权限   上下文   sel   chcon   

原文地址:https://www.cnblogs.com/jason-koo/p/12040153.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!