其他分享
首页 > 其他分享> > Fedora搭dokuwiki的步骤 以apache2.4为例

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

作者:互联网

  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

标签:RewriteRule,QSA,Fedora,dokuwiki,为例,httpd,doku,php,apache2.4
来源: https://www.cnblogs.com/jason-koo/p/12040153.html