diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index ef9300e5dc5bc58db805e3fa274d3976df47c6fb..ca14daf7916bacb79d06be928ef8407545c9709e 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1522,9 +1522,13 @@ class nginx_plugin { //proxy protocol settings if($web_config['vhost_proxy_protocol_enabled'] == "y"){ - $vhost_data['use_proxy_protocol'] = $data['new']['proxy_protocol']; - $vhost_data['proxy_protocol_http'] = (int)$web_config['vhost_proxy_protocol_http_port']; - $vhost_data['proxy_protocol_https'] = (int)$web_config['vhost_proxy_protocol_https_port']; + if((int)$web_config['vhost_proxy_protocol_https_port'] > 0) { + $vhost_data['use_proxy_protocol'] = $data['new']['proxy_protocol']; + $vhost_data['proxy_protocol_http'] = (int)$web_config['vhost_proxy_protocol_http_port']; + $vhost_data['proxy_protocol_https'] = (int)$web_config['vhost_proxy_protocol_https_port']; + } else { + $vhost_data['use_proxy_protocol'] = "n"; + } }else{ $vhost_data['use_proxy_protocol'] = "n"; }