diff --git a/public/assets/js/app.js b/public/assets/js/app.js index d2f7ce1..9d0c06c 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -72,8 +72,12 @@ worker_processes: 'auto', user: 'www-data', pid: '/run/nginx.pid', + access_log: '/var/log/nginx/access.log', - error_log: '/var/log/nginx/error.log', + error_log: '/var/log/nginx/error.log warn', + access_log_domain: false, + error_log_domain: false, + client_max_body_size: 16, gzip: true, server_tokens: false, @@ -161,6 +165,14 @@ return '/etc/nginx/ssl/' + $scope.domain() + '.key'; }; + $scope.accessLogDomainPath = function() { + return $scope.data.access_log.replace(/([^/]+)\.log$/, $scope.domain() + '.$1.log'); + }; + + $scope.errorLogDomainPath = function() { + return $scope.data.error_log.replace(/([^/]+)\.log (.+)$/, $scope.domain() + '.$1.log $2'); + }; + $scope.refreshHighlighting = function() { var sourceCodes = document.querySelectorAll('main .file .code.source'); @@ -431,6 +443,18 @@ return !!$scope.data.access_log; }; + $scope.isErrorLog = function() { + return !!$scope.data.error_log; + }; + + $scope.isAccessLogDomain = function() { + return $scope.data.access_log_domain; + }; + + $scope.isErrorLogDomain = function() { + return $scope.data.error_log_domain; + }; + $scope.isGzip = function() { return $scope.data.gzip; }; diff --git a/public/index.html b/public/index.html index 8d25d01..e4f23bd 100644 --- a/public/index.html +++ b/public/index.html @@ -57,6 +57,9 @@