install/lib/installer_base.lib.php | ●●●●● patch | view | raw | blame | history | |
interface/lib/classes/tform_base.inc.php | ●●●●● patch | view | raw | blame | history | |
interface/web/sites/form/web_vhost_domain.tform.php | ●●●●● patch | view | raw | blame | history | |
interface/web/sites/templates/web_vhost_domain_edit.htm | ●●●●● patch | view | raw | blame | history | |
interface/web/sites/web_vhost_domain_edit.php | ●●●●● patch | view | raw | blame | history | |
server/conf/nginx_vhost.conf.master | ●●●●● patch | view | raw | blame | history | |
server/plugins-available/nginx_plugin.inc.php | ●●●●● patch | view | raw | blame | history |
install/lib/installer_base.lib.php
@@ -2514,7 +2514,11 @@ if(is_file('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php'); if(is_file('/usr/local/ispconfig/interface/lib/classes/form.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/form.inc.php'); // Change mode of a few files from amavisd if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); } interface/lib/classes/tform_base.inc.php
@@ -710,7 +710,7 @@ if($record[$key] != '' && $record[$key] != '0000-00-00') { if(function_exists('date_parse_from_format')) { $date_parts = date_parse_from_format($this->dateformat, $record[$key]); $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day']; $new_record[$key] = $date_parts['year'].'-'.str_pad($date_parts['month'], 2, "0", STR_PAD_LEFT).'-'.str_pad($date_parts['day'], 2, "0", STR_PAD_LEFT); } else { $tmp = strtotime($record[$key]); $new_record[$key] = date('Y-m-d', $tmp); interface/web/sites/form/web_vhost_domain.tform.php
@@ -276,6 +276,15 @@ 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), 'enable_pagespeed' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', 'default' => 'n', 'value' => array ( 0 => 'n', 1 => 'y' ) ), 'active' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', interface/web/sites/templates/web_vhost_domain_edit.htm
@@ -217,6 +217,12 @@ </select></div> </div> {tmpl_var name="directive_snippets_id"} <div class="form-group nginx pagespeed"> <label class="col-sm-3 control-label">{tmpl_var name='enable_pagespeed_txt'}</label> <div class="col-sm-9"> {tmpl_var name="enable_pagespeed"} </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> <div class="col-sm-9"> @@ -276,6 +282,19 @@ }); // new Vhostsubdomains/Vhostaliasdomains if(serverId == '') jQuery('#parent_domain_id').trigger('change'); if(jQuery('#directive_snippets_id').val() > 0){ jQuery('.pagespeed').show(); } else { jQuery('.pagespeed').hide(); } jQuery('#directive_snippets_id').change(function(){ if(jQuery(this).val() > 0){ jQuery('.pagespeed').show(); } else { jQuery('.pagespeed').hide(); } }); function reloadServerId(noFormChange) { var parentWebId = jQuery('#parent_domain_id').val(); @@ -291,6 +310,19 @@ if(data.servertype == "nginx"){ var selected = jQuery('#php').val(); jQuery('.apache').hide(); jQuery('.nginx').show(); if(jQuery('#directive_snippets_id').val() > 0){ jQuery('.pagespeed').show(); } else { jQuery('.pagespeed').hide(); } jQuery('#directive_snippets_id').change(function(){ if(jQuery(this).val() > 0){ jQuery('.pagespeed').show(); } else { jQuery('.pagespeed').hide(); } }); if(selected != "no" && selected != "php-fpm" && selected != "hhvm") { jQuery('#php option[value="php-fpm"]').attr('selected', 'selected').val('php-fpm'); } @@ -299,6 +331,7 @@ jQuery('#php option[value="mod"]').hide(); jQuery('#php option[value="suphp"]').hide(); } else { jQuery('.nginx').hide(); jQuery('.apache').show(); jQuery('#php option[value="fast-cgi"]').show(); jQuery('#php option[value="cgi"]').show(); interface/web/sites/web_vhost_domain_edit.php
@@ -1091,6 +1091,7 @@ if($web_config['enable_spdy'] === 'n') { unset($app->tform->formDef["tabs"]['ssl']['fields']['enable_spdy']); } if($this->dataRecord["directive_snippets_id"] < 1) $this->dataRecord["enable_pagespeed"] = 'n'; parent::onSubmit(); } server/conf/nginx_vhost.conf.master
@@ -8,7 +8,7 @@ listen <tmpl_var name='ip_address'>:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if}; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; <tmpl_if name='ipv6_enabled'> listen [<tmpl_var name='ipv6_address'>]:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if};; listen [<tmpl_var name='ipv6_address'>]:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if}; </tmpl_if> ssl_certificate <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt; ssl_certificate_key <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key; @@ -192,6 +192,54 @@ <tmpl_var name='nginx_directive'> </tmpl_loop> <tmpl_if name='enable_pagespeed' op='==' value='y'> pagespeed on; pagespeed FileCachePath /var/ngx_pagespeed_cache; <tmpl_if name='ssl_enabled'>pagespeed FetchHttps enable,allow_self_signed;</tmpl_if> # let's speed up PageSpeed by storing it in the super duper fast memcached pagespeed MemcachedThreads 1; pagespeed MemcachedServers "localhost:11211"; # Filter settings pagespeed RewriteLevel CoreFilters; pagespeed EnableFilters collapse_whitespace,remove_comments; # Ensure requests for pagespeed optimized resources go to the pagespeed # handler and no extraneous headers get set. location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; access_log off; } location ~ "^/ngx_pagespeed_static/" { access_log off; } location ~ "^/ngx_pagespeed_beacon$" { access_log off; } location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; access_log off; } location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; access_log off; } location /ngx_pagespeed_message { allow 127.0.0.1; deny all; access_log off; } location /pagespeed_console { allow 127.0.0.1; deny all; access_log off; } </tmpl_if> <tmpl_loop name="basic_auth_locations"> location <tmpl_var name='htpasswd_location'> { ##merge## auth_basic "Members Only"; server/plugins-available/nginx_plugin.inc.php
@@ -1097,8 +1097,19 @@ } else { $nginx_directives = $data['new']['nginx_directives']; } if($data['new']['enable_pagespeed'] == 'y'){ // if PageSpeed is already enabled, don't add configuration again if(stripos($nginx_directives, 'pagespeed') !== false){ $vhost_data['enable_pagespeed'] = false; } else { $vhost_data['enable_pagespeed'] = true; } } else { $vhost_data['enable_pagespeed'] = false; } } else { $nginx_directives = $data['new']['nginx_directives']; $vhost_data['enable_pagespeed'] = false; } // Make sure we only have Unix linebreaks $nginx_directives = str_replace("\r\n", "\n", $nginx_directives);