- Updated apps vhost configuration fir nginx.
- Enabled Security Level (Server Config > Web > Security Level) for nginx.
| | |
| | | $content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content); |
| | | $content = str_replace('{apps_vhost_dir}', $conf['web']['website_basedir'].'/apps', $content); |
| | | $content = str_replace('{apps_vhost_servername}', $apps_vhost_servername, $content); |
| | | $content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content); |
| | | $content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content); |
| | | |
| | | wf($vhost_conf_dir.'/apps.vhost', $content); |
| | | |
| | | // PHP-FPM |
| | | // Dont just copy over the php-fpm pool template but add some custom settings |
| | | $content = rf('tpl/php_fpm_pool.conf.master'); |
| | | $content = str_replace('{fpm_pool}', 'apps', $content); |
| | | $content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content); |
| | | $content = str_replace('{fpm_user}', $apps_vhost_user, $content); |
| | | $content = str_replace('{fpm_group}', $apps_vhost_group, $content); |
| | | wf($conf['nginx']['php_fpm_pool_dir'].'/apps.conf', $content); |
| | | |
| | | //copy('tpl/nginx_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost"); |
| | | //* and create the symlink |
| | |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='server_type_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="server_type" id="server_type" class="selectInput" disabled="disabled"> |
| | | <select name="server_type" id="server_type" class="selectInput"> |
| | | {tmpl_var name='server_type'} |
| | | </select> |
| | | </div> |
| | |
| | | <label for="CA_pass">{tmpl_var name='CA_pass_txt'}</label> |
| | | <input name="CA_pass" id="CA_pass" value="{tmpl_var name='CA_pass'}" size="40" maxlength="255" type="password" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='security_level_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="security_level" id="security_level" class="selectInput"> |
| | |
| | | </div> |
| | | <script language="JavaScript" type="text/javascript"> |
| | | var serverType = jQuery('#server_type').val(); |
| | | jQuery('#server_type').replaceWith('<label for="server_Type">'+serverType+'</label><input type="hidden" name="server_type" value="'+serverType+'">'); |
| | | adjustForm(serverType); |
| | | jQuery('#server_type').change(function(){ |
| | | serverType = $(this).val(); |
| | |
| | | if(serverType == "nginx"){ |
| | | jQuery('.nginx').show(); |
| | | jQuery('.apache').hide(); |
| | | //jQuery('.tabbox_tabs li').find(":contains('FastCGI')").hide(); |
| | | //jQuery('.tabbox_tabs li').find(":contains('FastCGI')").remove(); |
| | | } else { |
| | | jQuery('.nginx').hide(); |
| | | jQuery('.apache').show(); |
| | | //jQuery('.tabbox_tabs li').find(":contains('FastCGI')").show(); |
| | | //jQuery('.tabbox_tabs li:eq(4)').after('<li><a href="javascript:changeTab(\'fastcgi\',\'admin/server_config_edit.php\')">FastCGI</a></li>'); |
| | | } |
| | | } |
| | | </script> |
| | |
| | |
|
| | | chdir = /
|
| | |
|
| | | <tmpl_if name='security_level' op='==' value='20'>
|
| | |
|
| | | <tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
|
| | | </tmpl_if>
|
| | |
|
| | | <tmpl_loop name="custom_php_ini_settings">
|
| | | <tmpl_var name='ini_setting'>
|
| | | </tmpl_loop> |
| | |
| | | $vhost_data['web_document_root'] = $data['new']['document_root'].'/web'; |
| | | $vhost_data['web_document_root_www'] = $web_config['website_basedir'].'/'.$data['new']['domain'].'/web'; |
| | | $vhost_data['web_basedir'] = $web_config['website_basedir']; |
| | | $vhost_data['security_level'] = $web_config['security_level']; |
| | | $vhost_data['allow_override'] = ($data['new']['allow_override'] == '')?'All':$data['new']['allow_override']; |
| | | $vhost_data['ssl_domain'] = $data['new']['ssl_domain']; |
| | | //$vhost_data['has_custom_php_ini'] = $has_custom_php_ini; |
| | | //$vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir); |
| | | $vhost_data['fpm_port'] = $web_config['php_fpm_start_port'] + $data['new']['domain_id']; |
| | | $vhost_data['fpm_port'] = $web_config['php_fpm_start_port'] + $data['new']['domain_id'] + 1; |
| | | |
| | | // Check if a SSL cert exists |
| | | $ssl_dir = $data['new']['document_root'].'/ssl'; |
| | |
| | | $tpl->newTemplate('php_fpm_pool.conf.master'); |
| | | |
| | | $tpl->setVar('fpm_pool', $data['new']['domain']); |
| | | $tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id']); |
| | | $tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id'] + 1); |
| | | $tpl->setVar('fpm_user', $data['new']['system_user']); |
| | | $tpl->setVar('fpm_group', $data['new']['system_group']); |
| | | $tpl->setVar('security_level',$web_config['security_level']); |
| | | $php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']); |
| | | $tpl->setVar('php_open_basedir', $php_open_basedir); |
| | | if($php_open_basedir != ''){ |