Skip to content

Commit

Permalink
feat: 添加 OpenResty 默认配置
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Nov 20, 2023
1 parent 007bbb0 commit 50662ec
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions scripts/openresty/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 50662ec

Please sign in to comment.