欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 养生 > 换服务器需要做的工作(记录一下)

换服务器需要做的工作(记录一下)

2025/2/22 4:38:28 来源:https://blog.csdn.net/wx23986/article/details/145718843  浏览:    关键词:换服务器需要做的工作(记录一下)

1.Nginx开启OCSP 加快Let’s Encrypt免费证书 HTTPS网站访问速度

https://blog.csdn.net/wx23986/article/details/141722669

2.添加伪静态规则

location / {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 ^([^\.]*)archive.html$ $1plugin.php?id=nimba_archive:list last;rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last;if (!-e $request_filename) {return 404;}
}

3.站点设置--其他设置--Nginx安全请求头 开启下面两个 其他的不要选

特别是不要选:让浏览器加载内容时只加载自己网站的内容

不然注册和登录 验证码无法显示

开启下面两个 其他的不要选

阻止浏览器上下文中执行恶意JavaScript代码

阻止浏览器的内容嗅探

4.Waf里面勾选  禁IDC访问----假蜘蛛---CC防御

5.Discuz! X3.5 根 目录权限设置

https://blog.csdn.net/wx23986/article/details/145721885

6.404替换

站点---配置文件

把error_page 404 /404.html; 替换成 error_page 404 /404.php;

7.宝塔加固建议

https://blog.csdn.net/wx23986/article/details/145750491

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词