这是耗子Linux面板的OpenResty默认页面!
当您看到此页面,说明该域名尚未与站点绑定。
EOF # 写入站点停止页 cat > ${openrestyPath}/html/stop.html << EOF该网站已被管理员停止访问!
当您看到此页面,说明该网站已被管理员停止对外访问,请联系管理员了解详情。
EOF # 处理文件权限 chmod 755 ${openrestyPath} chmod 644 ${openrestyPath}/html chmod -R 755 /www/wwwroot chown -R www:www /www/wwwroot chmod -R 644 /www/server/vhost # 写入无php配置文件 echo "" > ${openrestyPath}/conf/enable-php-0.conf # 自动为所有PHP版本创建配置文件 if [ -d "${setupPath}/server/php" ]; then cd ${setupPath}/server/php phpList=$(ls -l | grep ^d | awk '{print $NF}') for phpVersion in ${phpList}; do if [ -d "${setupPath}/server/php/${phpVersion}" ]; then # 写入PHP配置文件 cat > ${openrestyPath}/conf/enable-php-${phpVersion}.conf << EOF location ~ \.php$ { try_files \$uri =404; fastcgi_pass unix:/tmp/php-cgi-${phpVersion}.sock; fastcgi_index index.php; include fastcgi.conf; include pathinfo.conf; } EOF fi done fi # 写入代理默认配置文件 cat > ${openrestyPath}/conf/proxy.conf << EOF proxy_temp_path ${openrestyPath}/proxy_temp_dir; proxy_cache_path ${openrestyPath}/proxy_cache_dir levels=1:2 keys_zone=cache_one:20m inactive=1d max_size=5g; proxy_connect_timeout 60; proxy_read_timeout 60; proxy_send_timeout 60; proxy_buffer_size 32k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; proxy_cache cache_one; EOF # 建立日志目录 mkdir -p /www/wwwlogs/waf chown www:www /www/wwwlogs/waf chmod 755 /www/wwwlogs/waf # 写入服务文件 cat > /etc/systemd/system/openresty.service << EOF [Unit] Description=The OpenResty Application Platform After=syslog.target network-online.target remote-fs.target nss-lookup.target Wants=network-online.target [Service] Type=forking PIDFile=/www/server/openresty/nginx.pid ExecStartPre=/www/server/openresty/sbin/nginx -t -c /www/server/openresty/conf/nginx.conf ExecStart=/www/server/openresty/sbin/nginx -c /www/server/openresty/conf/nginx.conf ExecReload=/www/server/openresty/sbin/nginx -s reload ExecStop=/www/server/openresty/sbin/nginx -s quit [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable openresty.service systemctl restart openresty.service panel writePlugin openresty ${openrestyVersion} echo -e "${HR}\nOpenResty 安装完成\n${HR}"