Skip to content

Commit bcb8eb9

Browse files
committed
- Installer adds ispconfig user to Apache group on Fedora/CentOS so that nginx/PHP-FPM can access /etc/squirrelmail and serve SquirrelMail for the ISPConfig vhost.
- Added session.save_path and upload_tmp_dir settings to the PHP-FPM pool definitions.
1 parent cd5645e commit bcb8eb9

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,9 @@ public function install_ispconfig()
861861
if($conf['nginx']['installed'] == true){
862862
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
863863
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
864+
// Allow the ISPConfig vhost access to /etc/squirrelmail
865+
$command = 'usermod -a -G '.$conf['apache']['group'].' ispconfig';
866+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
864867
}
865868

866869
//* Make the shell scripts executable

install/tpl/php_fpm_pool.conf.master

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ pm.start_servers = 20
1313
pm.min_spare_servers = 5
1414
pm.max_spare_servers = 35
1515

16-
chdir = /
16+
chdir = /
17+
18+
php_admin_value[session.save_path] = /usr/local/ispconfig/server/temp
19+
php_admin_flag[magic_quotes_gpc] = off

server/conf/php_fpm_pool.conf.master

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ chdir = /
2424

2525
<tmpl_if name='security_level' op='==' value='20'>
2626
<tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
27+
php_admin_value[session.save_path] = <tmpl_var name='document_root'>/tmp
28+
php_admin_value[upload_tmp_dir] = <tmpl_var name='document_root'>/tmp
2729
</tmpl_if>
2830

2931
<tmpl_loop name="custom_php_ini_settings">

server/plugins-available/nginx_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ private function php_fpm_pool_update ($data,$web_config,$pool_dir,$pool_name,$so
11321132
$tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id'] + 1);
11331133
$tpl->setVar('fpm_user', $data['new']['system_user']);
11341134
$tpl->setVar('fpm_group', $data['new']['system_group']);
1135+
$tpl->setVar('document_root', $data['new']['document_root']);
11351136
$tpl->setVar('security_level',$web_config['security_level']);
11361137
$php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']);
11371138
$tpl->setVar('php_open_basedir', $php_open_basedir);

0 commit comments

Comments
 (0)