From a973c93c045d5a280ee6597357b438d04a1d9068 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Wed, 25 Aug 2021 17:58:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BE=A4=E8=BE=89update?= =?UTF-8?q?=E4=B9=8B=E5=90=8E403?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx.conf | 44 ++++++++++++++++++++++++++++++++++++++++++++ shell/check.sh | 3 ++- shell/share.sh | 3 ++- shell/update.sh | 1 + 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 docker/nginx.conf diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 00000000..a0b8f6f4 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,44 @@ +user root; +worker_processes auto; +pcre_jit on; +error_log /var/log/nginx/error.log warn; +include /etc/nginx/modules/*.conf; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + server_tokens off; + + client_max_body_size 20m; + + keepalive_timeout 65; + + sendfile on; + + tcp_nodelay on; + + ssl_prefer_server_ciphers on; + + ssl_session_cache shared:SSL:2m; + + gzip on; + gzip_static on; + gzip_types text/plain application/json application/javascript application/x-javascript text/css application/xml text/javascript; + gzip_proxied any; + gzip_vary on; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.0; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + include /etc/nginx/conf.d/*.conf; +} \ No newline at end of file diff --git a/shell/check.sh b/shell/check.sh index c0748d54..311d9087 100644 --- a/shell/check.sh +++ b/shell/check.sh @@ -30,7 +30,8 @@ copy_dep() { echo -e "---> 通知文件复制完成\n" echo -e "---> 2. 复制nginx配置文件\n" - cp -fv $nginx_conf /etc/nginx/conf.d/front.conf + cp -fv $nginx_conf /etc/nginx/nginx.conf + cp -fv $nginx_app_conf /etc/nginx/conf.d/front.conf echo -e "---> 配置文件复制完成\n" } diff --git a/shell/share.sh b/shell/share.sh index c89a4e98..80e1eb8c 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -32,7 +32,8 @@ file_notify_py_sample=$dir_sample/notify.py file_notify_py=$dir_scripts/notify.py file_notify_js=$dir_scripts/sendNotify.js task_error_log_path=$dir_log/task_error.log -nginx_conf=$dir_root/docker/front.conf +nginx_app_conf=$dir_root/docker/front.conf +nginx_conf=$dir_root/docker/nginx.conf ## 清单文件 list_crontab_user=$dir_config/crontab.list diff --git a/shell/update.sh b/shell/update.sh index d2790816..f9960e57 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -246,6 +246,7 @@ usage() { echo -e "5. $cmd_update rmlog # 删除旧日志" echo -e "6. $cmd_update bot # 启动tg-bot" echo -e "7. $cmd_update check # 检测青龙环境并修复" + echo -e "8. $cmd_update resetlet # 重置登录错误次数" } ## 更新qinglong