| | |
| | | if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); |
| | | |
| | | //* Change the log mount |
| | | /* |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind,nobootwait'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind,nobootwait'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | */ |
| | | |
| | | $fstab_line_old = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | |
| | | if($web_config['network_filesystem'] == 'y') { |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line_old, $fstab_line, 0, 1); |
| | | } else { |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line_old, $fstab_line, 0, 1); |
| | | } |
| | | |
| | | exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder)); |
| | | |
| | | |
| | | } |
| | | |
| | | //print_r($data); |
| | |
| | | $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); |
| | | if(substr($socket_dir, -1) != '/') $socket_dir .= '/'; |
| | | |
| | | // User sockets, but not with apache 2.4 as socket support is buggy in that version |
| | | if($data['new']['php_fpm_use_socket'] == 'y' && $app->system->getapacheversion() < 2.4){ |
| | | $apache_modules = $app->system->getapachemodules(); |
| | | |
| | | // Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version |
| | | if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){ |
| | | $use_tcp = 0; |
| | | $use_socket = 1; |
| | | } else { |
| | |
| | | $tpl->newTemplate('php_fpm_pool.conf.master'); |
| | | $tpl->setVar('apache_version', $app->system->getapacheversion()); |
| | | |
| | | if($data['new']['php_fpm_use_socket'] == 'y'){ |
| | | $apache_modules = $app->system->getapachemodules(); |
| | | |
| | | // Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version |
| | | if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){ |
| | | $use_tcp = 0; |
| | | $use_socket = 1; |
| | | if(!is_dir($socket_dir)) $app->system->mkdirpath($socket_dir); |