adds popular Quad9 and Verisign resolvers, disabled by default

fixes some tabulations here and there to align stuff using tabs=8 chars
adds a space for pid
pull/80/head
OldFart 2019-04-01 02:52:05 -04:00
parent 03dbde6e1d
commit d89003fe23
3 changed files with 45 additions and 21 deletions

View File

@ -52,8 +52,8 @@
proxy_pass: 'http://127.0.0.1:3000',
// ROUTING
root: true,
index: 'index.php',
root: true,
index: 'index.php',
fallback_html: false,
fallback_php: true,
fallback_php_path: '/api/',
@ -64,47 +64,57 @@
error_log_domain: false,
}],
// COMMON - HTTPS
ssl_profile: 'modern',
resolver_cloudflare: true,
resolver_cloudflare: true,
resolver_google: true,
resolver_opendns: true,
resolver_quad9: false,
resolver_verisign: false,
// COMMON - SECURITY
referrer_policy: 'no-referrer-when-downgrade',
referrer_policy: 'no-referrer-when-downgrade',
content_security_policy: 'default-src * data: \'unsafe-eval\' \'unsafe-inline\'',
server_tokens: false,
limit_req: false,
server_tokens: false,
limit_req: false,
// COMMON - PHP
php_server: '/var/run/php/php7.2-fpm.sock',
php_server: '/var/run/php/php7.2-fpm.sock',
php_server_backup: '',
// COMMON - PYTHON
python_server: '/tmp/uwsgi.sock',
// COMMON - PERFORMANCE
gzip: true,
brotli: false,
gzip: true,
brotli: false,
expires_assets: '7d',
expires_media: '7d',
expires_svg: '7d',
expires_fonts: '7d',
// COMMON - LOGGING
access_log: '/var/log/nginx/access.log',
error_log: '/var/log/nginx/error.log warn',
access_log: '/var/log/nginx/access.log',
error_log: '/var/log/nginx/error.log warn',
log_not_found: false,
// COMMON - NGINX
worker_processes: 'auto',
user: 'www-data',
pid: '/run/nginx.pid',
worker_processes: 'auto',
user: 'www-data',
pid: '/run/nginx.pid',
client_max_body_size: 16,
// COMMON - TOOLS
file_structure: 'modularized',
symlink: true,
symlink: true,
};
@ -925,6 +935,14 @@
return $scope.hasHTTPS() && $scope.data.resolver_opendns;
};
$scope.isResolverQuad9 = function() {
return $scope.hasHTTPS() && $scope.data.resolver_quad9;
};
$scope.isResolverVerisign = function() {
return $scope.hasHTTPS() && $scope.data.resolver_verisign;
};
// COMMON - SECURITY
@ -947,8 +965,6 @@
return $scope.hasPHP() && !!$scope.data.php_server_backup;
};
// COMMON - PERFORMANCE
$scope.isGzip = function() {
return $scope.data.gzip;
@ -958,8 +974,6 @@
return $scope.data.brotli;
};
// COMMON - LOGGING
$scope.isAccessLog = function() {
return !!$scope.data.access_log;

View File

@ -634,6 +634,14 @@
<input class="form-check-input" type="checkbox" id="resolver_opendns" ng-model="data.resolver_opendns">
<label class="form-check-label col-form-label-sm" for="resolver_opendns" tooltips tooltip-template="<code>208.67.222.222, 208.67.220.220</code>" tooltip-side="top">OpenDNS</label>
</div>
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.resolver_quad9 !== defaultData.resolver_quad9 }">
<input class="form-check-input" type="checkbox" id="resolver_quad9" ng-model="data.resolver_quad9">
<label class="form-check-label col-form-label-sm" for="resolver_quad9" tooltips tooltip-template="<code>9.9.9.9, 149.112.112.112</code>" tooltip-side="top">Quad9</label>
</div>
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.resolver_verisign !== defaultData.resolver_verisign }">
<input class="form-check-input" type="checkbox" id="resolver_verisign" ng-model="data.resolver_verisign">
<label class="form-check-label col-form-label-sm" for="resolver_verisign" tooltips tooltip-template="<code>64.6.64.6, 64.6.65.6</code>" tooltip-side="top">Verisign</label>
</div>
</div>
</div>
</div>

View File

@ -4,7 +4,7 @@
# {{ getUrl() }}</span>
user {{ data.user }};
pid {{ data.pid}};
pid {{ data.pid }};
worker_processes {{ data.worker_processes }};
worker_rlimit_nofile 65535;
@ -73,7 +73,9 @@ http {<!--
resolver {{
(isResolverCloudflare() ? '1.1.1.1 1.0.0.1 ' : '') +
(isResolverGoogle() ? '8.8.8.8 8.8.4.4 ' : '') +
(isResolverOpenDNS() ? '208.67.222.222 208.67.220.220 ' : '')
(isResolverOpenDNS() ? '208.67.222.222 208.67.220.220 ' : '') +
(isResolverQuad9() ? '9.9.9.9 149.112.112.112 ' : '') +
(isResolverVerisign() ? '64.6.64.6 64.6.65.6 ' : '')
}}valid=60s;
resolver_timeout 2s;</span></span>