Add ipvX_listen_address configuration for ht/

This commit is contained in:
Miraty 2022-09-03 18:15:22 +02:00
parent ea0ffab14a
commit 15b7e09826
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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'] . ';