فهرست منبع

Add ipvX_listen_address configuration for ht/

Miraty 2 سال پیش
والد
کامیت
15b7e09826
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 2 0
      config.ini
  2. 2 2
      pages/ht/add-http-dns.php

+ 2 - 0
config.ini

@@ -55,6 +55,8 @@ public_sftp_port = 2022
 
 
 ; Will be used in configuration files
 ; Will be used in configuration files
 https_port = 42443
 https_port = 42443
+ipv6_listen_address = "::1"
+ipv4_listen_address = "127.0.0.1"
 internal_onion_http_port = 9080
 internal_onion_http_port = 9080
 
 
 user_quota = 20971520
 user_quota = 20971520

+ 2 - 2
pages/ht/add-http-dns.php

@@ -29,8 +29,8 @@ if (processForm()) {
 	addSite($_SESSION['username'], $_POST['dir'], $_POST['domain'], "dns", "http");
 	addSite($_SESSION['username'], $_POST['dir'], $_POST['domain'], "dns", "http");
 
 
 	$nginxConf = 'server {
 	$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'] . ';
 	server_name ' . $_POST['domain'] . ';
 	root ' . CONF['ht']['ht_path'] . '/' . $_SESSION['username'] . '/' . $_POST['dir'] . ';
 	root ' . CONF['ht']['ht_path'] . '/' . $_SESSION['username'] . '/' . $_POST['dir'] . ';