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';

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值