fix nginx

This commit is contained in:
mercury
2024-12-22 14:39:58 +04:00
parent ef690349fd
commit 2525181655
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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);
+2 -3
View File
@@ -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;