下面是个人的Nginx vhost配置文件,添加到nginx重写规则中,供参考:
server {
listen 80;
server_name 111com.net www.111com.net ;
access_log /data/wwwlogs/111com.net _nginx.log combined;
index index.html index.php duku.php;
include /usr/local/nginx/conf/none.conf;
root /data/wwwroot/111com.net ;
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
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 ^/(?!lib/)(.*) /doku.php?id=$1&$args last;
}
location ~ [^/].php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*.(js|css)?$ {
expires 7d;
access_log off;
}
}
核心规则如下,需要加入server段内:
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
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 ^/(?!lib/)(.*) /doku.php?id=$1&$args last;
}
location ~ .*.(js|css)?$ {
expires 7d;
access_log off;
}
下面一步,将conf/local.php中加入一行:
1
$conf['userewrite'] = 2;
最后修改dokuwiki后台设置,后台 -> 管理 -> 配置管理器 -> 高级设置 -> 使用更整洁的 URL,选中.htaccess保存后查看效果。
凡尔赛法环免广告版 最新版v1.69.1
下载天煞异种 安卓版v1.0.21
下载十三月 (Undecember)最新官方中文版v3.26.0200
下载我不是废柴无限99999钻999999金币游戏 不减反增版v1.2.16
下载我的女友是声优免广告 安卓版v1
我的女友是声优免广告是一款非常好玩的模拟经营类手游,玩家在游
石器帝国去广告版 v8
石器帝国免广告版是游戏的破解版本,在该版本中为玩家去除了广告
校园恋爱模拟器真人版去广告版 v0.0.7
校园恋爱模拟器真人版免广告版是游戏的破解版本,在该版本中为玩
教练我要开球馆内置菜单修改器 安卓版v1.5.4
教练我要开球馆内购版是一款模拟经营类游戏,玩家们将在游戏中创
我的游轮无限砖石 安卓版v1.7.0
我的游轮无限金币钻石版是一款模拟经营类游戏,你将成为一艘游轮