Skip to content
Snippets Groups Projects
Commit 9220c71a authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'fix_ssl_placeholders_in_nginx_apps_template' into 'develop'

Fix Nginx SSL placeholders in apps_vhost_plugin.inc.php

See merge request ispconfig/ispconfig3!1259
parents 3c27e267 4efa7d7c
No related branches found
No related tags found
No related merge requests found
......@@ -192,6 +192,7 @@ class apps_vhost_plugin {
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
if( file_exists('/var/run/php5-fpm.sock')
|| file_exists('/var/lib/php5-fpm/apps.sock')
|| file_exists('/var/run/php/php7.0-fpm.sock')
|| file_exists('/var/run/php/php7.1-fpm.sock')
|| file_exists('/var/run/php/php7.2-fpm.sock')
......@@ -204,6 +205,18 @@ class apps_vhost_plugin {
$use_tcp = '';
$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_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