关于宝塔面板:宝塔部署免费WAF长亭雷池防护个人网站

原文地址: 宝塔部署长亭waf防护本人的网站 雷池是长亭科技耗时近 10 年倾情打造的 WAF,外围检测能力由智能语义剖析算法驱动。 Slogan: 不让黑客越雷池半步。这里是官网地址:长亭雷池 WAF 社区版 (chaitin.cn)。 部署资源零碎版本:Ubuntu Server 20.04 LTS 64bit 规格:CPU - 2核 内存 - 2GB 系统盘 - SSD云硬盘 40GB 部署形式单机下部署:宝塔负责运维治理网站、长亭WAF负责防护外来攻打 部署开始装置宝塔自行部署 装置网站建设必要软件我这里是动态站所以只须要装置nginx,docker是后边waf装置须要动用到的所以也是必须装置。依据本人的网站环境须要装置即可。 批改默认端口这里须要批改 nginx 默认监听端口 80(http)443(https) 找到/www/server/panel/vhost/nginx/0.default.conf文件批改如下: server{ listen 81; server_name _; index index.html; root /www/server/nginx/html;}找到/www/server/panel/vhost/nginx/phpfpm_status.conf文件批改如下: server { listen 81; server_name 127.0.0.1; allow 127.0.0.1; location /nginx_status { stub_status on; access_log off; } location /phpfpm_52_status { fastcgi_pass unix:/tmp/php-cgi-52.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_53_status { fastcgi_pass unix:/tmp/php-cgi-53.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_54_status { fastcgi_pass unix:/tmp/php-cgi-54.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_55_status { fastcgi_pass unix:/tmp/php-cgi-55.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_56_status { fastcgi_pass unix:/tmp/php-cgi-56.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_70_status { fastcgi_pass unix:/tmp/php-cgi-70.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_71_status { fastcgi_pass unix:/tmp/php-cgi-71.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_72_status { fastcgi_pass unix:/tmp/php-cgi-72.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_73_status { fastcgi_pass unix:/tmp/php-cgi-73.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_74_status { fastcgi_pass unix:/tmp/php-cgi-74.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_75_status { fastcgi_pass unix:/tmp/php-cgi-75.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_80_status { fastcgi_pass unix:/tmp/php-cgi-80.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_81_status { fastcgi_pass unix:/tmp/php-cgi-81.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } location /phpfpm_82_status { fastcgi_pass unix:/tmp/php-cgi-82.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; }}更改实现后须要到nginx面板去重载配置以及重启操作!以防万一这两项操作必须都进行! ...

August 16, 2023 · 2 min · jiezi

关于宝塔面板:项目推送到远程仓库后宝塔webhook自动发布

一、服务器装置git装置命令yum install git已装置的能够查看git版本git --version我始终装置失败,不晓得什么起因,如果有大神晓得,请指教一二。于是我就用如下步骤装置git了 1. 进入git官网https://mirrors.edge.kernel.o... 2. 找到你须要的版本 3. 右键gz或者xz,复制链接地址4. wget+链接地址下载wget https://www.kernel.org/pub/software/scm/git/git-2.35.1.tar.gz 5. 解压缩tar -zxf git-2.35.1.tar.gz 6. 装置进入文件夹:cd git-2.35.1设置装置门路:./configure --prefix=/usr/local/构建和装置:make && make install 7. 查看git --version git version 2.35.1装置胜利 二、 装置webhook 三、点击设置 - 增加 - 输出名称和执行脚本 执行脚本如下,有两处须要批改gitPath="/www/wwwroot/$1"(留神你的阿里云文件门路,如果不一样须要批改)gitHttp="https://gitee.com/yourname/$1.git"(留神你的近程仓库地址,肯定要改)#!/bin/bashecho ""#输入以后工夫date --date='0 days ago' "+%Y-%m-%d %H:%M:%S"echo "Start"#判断宝塔WebHook参数是否存在if [ ! -n "$1" ];then echo "param参数谬误" echo "End" exitfi#git我的项目门路gitPath="/www/wwwroot/$1"#git 网址gitHttp="https://gitee.com/yourname/$1.git" echo "Web站点门路:$gitPath" #判断我的项目门路是否存在if [ -d "$gitPath" ]; then cd $gitPath #判断是否存在git目录 if [ ! -d ".git" ]; then echo "在该目录下克隆 git" git clone $gitHttp gittemp mv gittemp/.git . rm -rf gittemp fi #拉取最新的我的项目文件 git reset --hard origin/master git pull #设置目录权限 chown -R www:www $gitPath echo "End" exitelse echo "该我的项目门路不存在" echo "End" exitfi四、 配置近程仓库宝塔面板,关上webhook密钥近程仓库,配置WebHook ...

February 19, 2022 · 1 min · jiezi