From 781fc2953bc9a9ce75be3202b711b166ea3789b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Mon, 1 Jan 2024 10:21:11 +0800 Subject: [PATCH] Fix install_nginx.sh --- install_nginx.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_nginx.sh b/install_nginx.sh index 02ed264..d79f415 100644 --- a/install_nginx.sh +++ b/install_nginx.sh @@ -90,6 +90,8 @@ if [ -z "$cpu_cores" ]; then cpu_cores="1"; fi if [[ $(vercomp "$ubuntu_ver" "16") == "<" ]]; then #Need update ca-certificates manual + sudo apt-get install -y apt-transport-https ca-certificates + sudo update-ca-certificates sudo bash -l -c " cd /root && wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ca-certificates/20210119~20.04.2/ca-certificates_20210119~20.04.2.tar.xz --no-check-certificate -O ca-certificates_20210119~20.04.2.tar.xz && @@ -241,7 +243,7 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo cp -f objs/ngx_http_modsecurity_module.so /etc/nginx/modules/. && \ echo 'load_module modules/ngx_http_modsecurity_module.so;' > /etc/nginx/modules-enabled/50-mod-modsecurity.conf && \ mkdir -p /etc/nginx/modsec && \ - wget --no-check-certificate -P /etc/nginx/modsec/ https://raw.githubusercontent.com/SpiderLabs/ModSecurity/v3/master/modsecurity.conf-recommended -O modsecurity.conf && \ + wget --no-check-certificate -P /etc/nginx/modsec/ https://raw.githubusercontent.com/SpiderLabs/ModSecurity/v3/master/modsecurity.conf-recommended -O /etc/nginx/modsec/modsecurity.conf && \ cd .. && \ cp -f ModSecurity/unicode.mapping /etc/nginx/modsec && \ sed -i 's/SecRuleEngine DetectionOnly/SecRuleEngine On/' /etc/nginx/modsec/modsecurity.conf && \