From 252518165546f5f22ebba3d74bcbd444f0ac917a Mon Sep 17 00:00:00 2001 From: mercury Date: Sun, 22 Dec 2024 14:39:58 +0400 Subject: [PATCH] fix nginx --- app/bot.php | 2 +- config/nginx_default.conf | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/bot.php b/app/bot.php index 325415e..d5bf9a8 100644 --- a/app/bot.php +++ b/app/bot.php @@ -6346,7 +6346,7 @@ DNS-over-HTTPS with IP: { $conf = $this->getPacConf(); $template = file_get_contents('/config/nginx_default.conf'); - $template = preg_replace('~server_name ip~', "server_name {$this->ip}", $template); + // $template = preg_replace('~server_name ip~', "server_name {$this->ip}", $template); $template = preg_replace('~server_name domain~', "server_name " . ($conf['domain'] ? " *.{$conf['domain']} {$conf['domain']}" : '_'), $template); if ($conf['domain'] && $conf['letsencrypt']) { $template = preg_replace('/#~([^\n]+)?/', "#~{$conf['letsencrypt']}", $template); diff --git a/config/nginx_default.conf b/config/nginx_default.conf index 2f8cb4d..932a28a 100644 --- a/config/nginx_default.conf +++ b/config/nginx_default.conf @@ -36,9 +36,8 @@ http { } server { - server_name ip; - listen 10.10.0.2:443 ssl http2 proxy_protocol; - listen 10.10.1.2:443 ssl http2; + listen 10.10.0.2:443 ssl http2 proxy_protocol default_server; + listen 10.10.1.2:443 ssl http2 default_server; ssl_certificate /certs/self_public; ssl_certificate_key /certs/self_private;