Skip to content
Snippets Groups Projects
Commit 037bf6fe authored by ms217's avatar ms217
Browse files

Fix Nginx SSL placeholders in apps_vhost_plugin.inc.php

parent 1a13adb4
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,18 @@ class apps_vhost_plugin { ...@@ -204,6 +204,18 @@ class apps_vhost_plugin {
$use_tcp = ''; $use_tcp = '';
$use_socket = '#'; $use_socket = '#';
} }
/* Check if SSL should be enabled: */
if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
$content = str_replace('{ssl_comment}', '', $content);
$content = str_replace('{ssl_on}', 'ssl', $content);
$content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
} else {
$content = str_replace('{ssl_comment}', '#', $content);
$content = preg_replace('/(\s)\{ssl_on\}/', '', $content);
$content = str_replace('{vhost_port}', $web_config['apps_vhost_port'], $content);
}
$content = str_replace('{use_tcp}', $use_tcp, $content); $content = str_replace('{use_tcp}', $use_tcp, $content);
$content = str_replace('{use_socket}', $use_socket, $content); $content = str_replace('{use_socket}', $use_socket, $content);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment