127.0.0.1/dokuwiki/install.php,DokuWiki安装+集成markdown编辑器editor.md
安裝
安裝php和nginx yum install -y php70w php70w-gd php70w-xml php70w-fpm nginx
開機自啟動 systemctl enable nginx php-fpm
配置nginx
server {
listen 80;
server_name localhost;
# Maximum file upload size is 4MB - change accordingly if needed
client_max_body_size 4M;
client_body_buffer_size 128k;
root /dokuwiki;
index doku.php;
#Remember to comment the below out when you're installing, and uncomment it when done.
location ~ /(conf/|bin/|inc/|install.php) { deny all; }
#Support for X-Accel-Redirect
location ~ ^/data/ { internal ; }
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$ {
expires 365d;
}
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
# rewrites "doku.php/" out of the URLs if you set the userwrite setting to .htaccess in dokuwiki config page
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1&$args last;
}
location ~ \.php$ {
try_files $uri $uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass 127.0.0.1:9000;
}
}
啟動nginx和php-fpm systemctl start php-fpm nginx
在網站一欄輸入:http://你的ip地址/install.php 在右上角選好語言,簡體中文zh,按照提示安裝即可。如果打開頁面保存,請修改conf、data、lib目前的權限。
安裝插件
新增頁面Add New Page插件
Markdown插件Markdown Page Plugin
側邊欄
安裝Indexmenu Plugin插件
新建data\pages\sidebar.txt,內容如下:
===== 導航目錄 =====
{{indexmenu>..|navbar}}
===== 添加新頁面 =====
{{NEWPAGE}}
中文文件名亂碼
修改dokuwiki/conf/local.php在最后一行加上:
$conf['fnencode']='utf-8';
總結
以上是生活随笔為你收集整理的127.0.0.1/dokuwiki/install.php,DokuWiki安装+集成markdown编辑器editor.md的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle驱动权限如何修改,详解如何实
- 下一篇: linux sed i 大文件,sed