https://pan.quark.cn/s/266668b60615#/list/share
分类: Linux面板
-
宝塔面板使用Nginx进行反代,提升网站访问速度和增强防护
文章来源 https://zhujiwiki.com/21245/
假设你有2台VPS,一台为Linode日本,IP为1.1.1.1(国内直接访问速度慢),一台为香港CN2,IP为2.2.2.2(国内访问速度快)
网站建在Linode日本VPS上,域名为 xxxxx.com。
在香港CN2 VPS上安装宝塔面板,并安装Nginx。
2、在你的网站域名解析处,域名A记录设置为香港CN2 VPS的IP:2.2.2.2
3、在香港CN2 VPS宝塔面板页面设置:
新建网站 xxxxx.com,SSL证书,反向代理设置为 xxxxx.com,并开启缓存
修改 /etc/hosts 文件,在文件末尾添加如下信息:
1.1.1.1 xxxxx.com
1.1.1.1 www.xxxxx.com
4、文件缓存位置默认为 /www/server/nginx/proxy_cache_dir
反代配置文件为 /www/server/nginx/conf/proxy.conf
-
三个Linux面板
宝塔面板v7.7.0纯净版: curl -sSO https://raw.githubusercontent.com/zhucaidan/btpanel-v7.7.0/main/install/install_panel.sh && bash install_panel.sh
mdserver-web面板: curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install.sh | bash
耗子面板: curl -fsLm 10 -o install.sh https://dl.cdn.haozi.net/panel/install.sh && bash install.sh