666 (@sixsixsix) 在 小鸡太小,面板不好安装,手撸nginx配置怎么方便 中发帖
如题,小鸡太小,1c1g,为了节省资源,nginx我选择使用系统自带的nginx,不安装其他可视化编辑界面,但配置反代的时候,一些基础配置复制来复制去也很麻烦,所以我让AI帮我写了小脚本来用用,使用起来很实用。
1.准备工作
怎么安装nginx这些就不说,基本系统都会自带一个的,更新一下就好了。
1.1 创建脚本目录结构
在home目录下创建脚本目录 nginx,文件结构可以如下
root@xvXRkbf83V:~/nginx# tree
.
├── backups
├── nginx-monitor.sh
├── nginx-site.sh
└── templates
├── proxy.template
└── static.template
说明:
backups 目录是用来备份所有配置的
nginx-monitor.sh 是简易监控脚本
nginx-s...