@@ -192,6 +192,7 @@ function update($event_name, $data) {
192192 $ content = str_replace ('{fpm_socket} ' , $ fpm_socket , $ content );
193193 $ content = str_replace ('{cgi_socket} ' , $ cgi_socket , $ content );
194194 if ( file_exists ('/var/run/php5-fpm.sock ' )
195+ || file_exists ('/var/lib/php5-fpm/apps.sock ' )
195196 || file_exists ('/var/run/php/php7.0-fpm.sock ' )
196197 || file_exists ('/var/run/php/php7.1-fpm.sock ' )
197198 || file_exists ('/var/run/php/php7.2-fpm.sock ' )
@@ -204,6 +205,18 @@ function update($event_name, $data) {
204205 $ use_tcp = '' ;
205206 $ use_socket = '# ' ;
206207 }
208+
209+ /* Check if SSL should be enabled: */
210+ if (is_file ('/usr/local/ispconfig/interface/ssl/ispserver.crt ' ) && is_file ('/usr/local/ispconfig/interface/ssl/ispserver.key ' )) {
211+ $ content = str_replace ('{ssl_comment} ' , '' , $ content );
212+ $ content = str_replace ('{ssl_on} ' , 'ssl ' , $ content );
213+ $ content = str_replace ('{vhost_port} ' , $ web_config ['apps_vhost_port ' ], $ content );
214+ } else {
215+ $ content = str_replace ('{ssl_comment} ' , '# ' , $ content );
216+ $ content = preg_replace ('/(\s)\{ssl_on\}/ ' , '' , $ content );
217+ $ content = str_replace ('{vhost_port} ' , $ web_config ['apps_vhost_port ' ], $ content );
218+ }
219+
207220 $ content = str_replace ('{use_tcp} ' , $ use_tcp , $ content );
208221 $ content = str_replace ('{use_socket} ' , $ use_socket , $ content );
209222
0 commit comments