摘要: 项目目录结构 demo config config.go conf config.yaml log utils utils.go main.go 代码 config.go package configimport ( "fmt" "github.com/toolkits/pkg/file" "git 阅读全文
posted @ 2024-05-17 17:19 fighting-go 阅读(14) 评论(0) 推荐(0)
摘要: 可以通过nginx的limit_req zone模块限流,在nginx的主配置文件nginx.conf中新增配置: geo $limit { default 1; 127.0.0.1 0; 192.168.1.0/24 0; } map $limit $limit_key { 0 ""; 1 $pr 阅读全文
posted @ 2023-03-02 11:01 fighting-go 阅读(138) 评论(0) 推荐(0)
摘要: 使用nginx反向代理jumpsever访问报错如下: 解决方法: 在nginx添加如下配置: location / { proxy_pass http://jumpserver:80; proxy_set_header Host $host; proxy_set_header X-Real-IP 阅读全文
posted @ 2022-11-14 10:37 fighting-go 阅读(1012) 评论(0) 推荐(0)
摘要: 在location中添加如下配置 listen 80 proxy_protocol; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-For $remote_a 阅读全文
posted @ 2022-10-08 16:29 fighting-go 阅读(71) 评论(0) 推荐(0)
摘要: nginx版本:1.22 安装依赖包: #yum -y install pcre-devel openssl openssl-devel GeoIP-devel.x86_64 #cd nginx-1.22.0/ #./configure --prefix=/export/server/nginx - 阅读全文
posted @ 2022-09-13 09:47 fighting-go 阅读(39) 评论(0) 推荐(0)
摘要: 背景:架构采用源码编译安装,软件版本如下: Centos:7.2系统 httpd:2.4版本 mysql:5.7版本 php:7.3版本 关闭防火墙和selinux机制 systemctl stop firewalld.service systemctl disable firewalld.serv 阅读全文
posted @ 2019-06-04 15:51 fighting-go 阅读(263) 评论(0) 推荐(0)
摘要: 背景:使用mysql5.7做主从复制,配置mycat做读写分离和分库分表 资源部署:系统:Centos7.2 ip: 192.168.117.152 ( 安装mysql - 主 )系统:Centos7.2 ip: 192.168.117.161 ( 安装mysql - 从)系统:Centos7.2 阅读全文
posted @ 2019-05-31 14:41 fighting-go 阅读(812) 评论(0) 推荐(0)
摘要: 背景:使用jenkins+maven+gitlab发布部署项目资源:192.168.117.152 安装(jenkins、maven、git、jdk)192.168.117.161 安装(gitlab)192.168.117.150 测试机(安装java环境,如果发布war包,需要Tomcat) 首 阅读全文
posted @ 2019-05-31 13:57 fighting-go 阅读(175) 评论(0) 推荐(0)