当前位置: 首页 > news >正文

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

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


http://www.mrgr.cn/news/91644.html

相关文章:

  • linux系统搭建DNS服务器、详细知识讲解
  • 使用 acme.sh 申请和管理 免费SSL 证书:告别 certbot 的繁琐
  • Android JNI的理解与使用。
  • 以deepseek为例的AI学习及公司知识库的搭建
  • 基于 Spring Boot 的社区居民健康管理系统部署说明书
  • Lua笔记
  • 泰山派RK3566移植QT,动鼠标时出现屏幕闪烁
  • Kubernetes的Ingress 资源是什么?
  • linux使用
  • 导出指定文件夹下的文件结构 工具模块-Python
  • 使用rknn进行yolo11-pose部署
  • 数组和指针常见笔试题(深度剖析)
  • POI pptx转图片
  • fpga助教面试题
  • 单细胞转录组画小提琴VlnPlot只显示需要类型细胞
  • 在项目中调用本地Deepseek(接入本地Deepseek)
  • DeepSeek大模型简介
  • MySQL 主从复制原理及其工作过程
  • ubuntu源码方式安装TensorRT-LLM推理框架(超详细)
  • VScode C语言学习开发环境;运行提示“#Include错误,无法打开源文件stdio.h”