Skip to content

Commit 67d81d3

Browse files
author
Till Brehm
committed
Fixed nginx socket path in apps vhost for Ubuntu 18.04.
1 parent da1e393 commit 67d81d3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,9 +2135,9 @@ public function configure_apps_vhost() {
21352135
$content = str_replace('{ssl_comment}', '#', $content);
21362136

21372137
// Fix socket path on PHP 7 systems
2138-
if(file_exists('/var/run/php/php7.0-fpm.sock')) {
2139-
$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2140-
}
2138+
if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2139+
if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);
2140+
if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content);
21412141

21422142
wf($vhost_conf_dir.'/apps.vhost', $content);
21432143

server/plugins-available/apps_vhost_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ function update($event_name, $data) {
183183
}
184184
$content = str_replace('{use_tcp}', $use_tcp, $content);
185185
$content = str_replace('{use_socket}', $use_socket, $content);
186+
187+
// Fix socket path on PHP 7 systems
188+
if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
189+
if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);
190+
if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content);
186191

187192
// PHP-FPM
188193
// Dont just copy over the php-fpm pool template but add some custom settings

0 commit comments

Comments
 (0)