最近想写一下api接口文档,但是实在不擅长写html页面,所以想到了wiki系统。dokuwiki 不需要数据库,安装和配置都非常简便,于是api接口文档便上线了,访问地址:api.xlongwei.com。
dokuwiki下载地址:http://tool.xlongwei.com/softwares/dokuwiki.tgz,这个是支持php 5.1.6的老版本,可到官网下载新版本。
安装步骤:
dokuwiki下载地址:http://tool.xlongwei.com/softwares/dokuwiki.tgz,这个是支持php 5.1.6的老版本,可到官网下载新版本。
安装步骤:
- 解压
tar zxvf dokuwiki.tgz
- 开放目录权限
chown -R nobody:nobody dokudata
chown -R nobody:nobody conf
chown -R nobody:nobody inc - 修改数据目录
vi conf/local.php
$conf['savedir'] = '/soft/dokudata'; //方便单独备份程序和数据 - 配置nginx
server {
server_name wiki.xlongwei.com;
root /soft/dokuwiki;
index doku.php;
location ~ .*\.php$ {
if ( $http_user_agent ~* .*(spider|heimdall).* ) { return 403; }
proxy_set_header Host $host;
fastcgi_pass bbs;
fastcgi_index doku.php;
fastcgi_intercept_errors on;
fastcgi_keep_conn on;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 600;
include fastcgi.conf;
}
location ~ /(conf|bin|inc)/ {
deny all;
}
location ~ /data/ {
internal;
}
} - 访问/install.php
配置wiki名称,admin密码等 - 侧边栏
添加或编辑sidebar页面,http://wiki.xlongwei.com/doku.php?id=sidebar&do=edit - wiki语法:http://phylab.fudan.edu.cn/doku.php?id=wiki:syntax