Added proxy template for support proxy request from nginx to another service

This commit is contained in:
Alexey Berezhok
2024-10-07 23:21:17 +03:00
parent 9d93d56a05
commit 3225e8cbea
10 changed files with 206 additions and 20 deletions

View File

@@ -83,6 +83,7 @@ if (empty($v_nginx_cache_duration)) {
$v_proxy = $data[$v_domain]["PROXY"];
$v_proxy_template = $data[$v_domain]["PROXY"];
$v_proxy_ext = str_replace(",", ", ", $data[$v_domain]["PROXY_EXT"]);
$v_proxy_port = $data[$v_domain]["PROXY_PORT_INTERNAL"];
$v_stats = $data[$v_domain]["STATS"];
$v_stats_user = $data[$v_domain]["STATS_USER"];
$v_stats_password = "";
@@ -422,6 +423,9 @@ if (!empty($_POST["save"])) {
if (!empty($_POST["v_proxy_template"])) {
$v_proxy_template = $_POST["v_proxy_template"];
}
if (!empty($_POST["v_proxy_port"])) {
$v_proxy_port = $_POST["v_proxy_port"];
}
exec(
HESTIA_CMD .
"v-change-web-domain-proxy-tpl " .
@@ -432,7 +436,9 @@ if (!empty($_POST["save"])) {
quoteshellarg($v_proxy_template) .
" " .
quoteshellarg($ext) .
" 'no'",
" 'no'" .
" " .
quoteshellarg($v_proxy_port),
$output,
$return_var,
);
@@ -459,6 +465,9 @@ if (!empty($_POST["save"])) {
$ext = str_replace(" ", ",", $ext);
$v_proxy_ext = str_replace(",", ", ", $ext);
}
if (!empty($_POST["v_proxy_port"])) {
$v_proxy_port = $_POST["v_proxy_port"];
}
exec(
HESTIA_CMD .
"v-add-web-domain-proxy " .
@@ -469,7 +478,9 @@ if (!empty($_POST["save"])) {
quoteshellarg($v_proxy_template) .
" " .
quoteshellarg($ext) .
" 'no'",
" 'no'" .
" " .
quoteshellarg($v_proxy_port),
$output,
$return_var,
);