URLOS一键安装Discuz! x 3.4 并设置伪静态

一键安装Discuz! x 3.4

ssh连接主机后,使用如下代码进行安装:

mkdir -p /data/urlos/tmp && cat > /data/urlos/tmp/websiteInitData.json <<-EOF
{
"domains": "请修改为你的域名",
"ports": "80 8080",
"appId": 6,
"nodeId": 1,
"dbPassword": "这里设置数据库密码",
"sftpPassword": "这里设置SFTP密码",
"otherDatas": {"description": "myWebsite"}
}
EOF
curl -O https://www.urlos.com/siu && sh siu

设置伪静态

首先在Discuz! x 3.4后台开启伪静态功能,然后访问http://你的主机IP:9968登录URLOS面板,修改并部署Discuz! x 3.4,在nginx配置中的伪静态项目中填写如下内容:

rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last;

URLOS一键安装Discuz! x 3.4 并设置伪静态插图
点击提交即可!

使用URLOS安装的Discuz! x 3.4,配置伪静态的方法就这么简单,你学会了吗?
更多好应用尽在URLOS

没有账号? 忘记密码?

社交账号快速登录