From 50662ecfa16c1e9f735a17f2629ced1cb064aa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Mon, 20 Nov 2023 18:04:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20OpenResty=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/openresty/install.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/openresty/install.sh b/scripts/openresty/install.sh index efe5eac2..4fa8a9c0 100644 --- a/scripts/openresty/install.sh +++ b/scripts/openresty/install.sh @@ -494,8 +494,7 @@ cat > ${openrestyPath}/html/stop.html << EOF EOF # 处理文件权限 -chmod 755 ${openrestyPath} -chmod 644 ${openrestyPath}/html +chmod -R 755 ${openrestyPath} chmod -R 755 /www/wwwroot chown -R www:www /www/wwwroot chmod -R 644 /www/server/vhost @@ -538,6 +537,19 @@ proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; proxy_cache cache_one; EOF +# 写入默认站点配置文件 +cat > ${openrestyPath}/conf/default.conf << EOF +server +{ + listen 80 default_server; + listen 443 ssl default_server; + server_name _; + index index.html; + root /www/server/openresty/html; + ssl_reject_handshake on; +} +EOF + # 建立日志目录 mkdir -p /www/wwwlogs/waf chown www:www /www/wwwlogs/waf