From 15b7e098260b27c10d38c56362097121b2d81b41 Mon Sep 17 00:00:00 2001 From: Miraty Date: Sat, 3 Sep 2022 18:15:22 +0200 Subject: [PATCH] Add ipvX_listen_address configuration for ht/ --- config.ini | 2 ++ pages/ht/add-http-dns.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.ini b/config.ini index c8bf876..c83fd0b 100644 --- a/config.ini +++ b/config.ini @@ -55,6 +55,8 @@ public_sftp_port = 2022 ; Will be used in configuration files https_port = 42443 +ipv6_listen_address = "::1" +ipv4_listen_address = "127.0.0.1" internal_onion_http_port = 9080 user_quota = 20971520 diff --git a/pages/ht/add-http-dns.php b/pages/ht/add-http-dns.php index 0f3b41e..91077fc 100644 --- a/pages/ht/add-http-dns.php +++ b/pages/ht/add-http-dns.php @@ -29,8 +29,8 @@ if (processForm()) { addSite($_SESSION['username'], $_POST['dir'], $_POST['domain'], "dns", "http"); $nginxConf = 'server { - listen [::1]:' . CONF['ht']['https_port'] . ' ssl http2; - listen 127.0.0.1:' . CONF['ht']['https_port'] . ' ssl http2; + listen [' . CONF['ht']['ipv6_listen_address'] . ']:' . CONF['ht']['https_port'] . ' ssl http2; + listen ' . CONF['ht']['ipv4_listen_address'] . ':' . CONF['ht']['https_port'] . ' ssl http2; server_name ' . $_POST['domain'] . '; root ' . CONF['ht']['ht_path'] . '/' . $_SESSION['username'] . '/' . $_POST['dir'] . ';