diff --git a/.eslintrc.cjs b/.eslintrc.cjs index c06f4b6..583e355 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -30,6 +30,7 @@ module.exports = { 'vue/html-self-closing': 0, 'vue/multi-word-component-names': 0, 'vue/no-reserved-component-names': 0, + 'eol-last': ['error', 'always'], }, globals: { 'describe': true, diff --git a/src/nginxconfig/generators/conf/general.conf.js b/src/nginxconfig/generators/conf/general.conf.js index a1f32f2..abd8fea 100644 --- a/src/nginxconfig/generators/conf/general.conf.js +++ b/src/nginxconfig/generators/conf/general.conf.js @@ -33,13 +33,11 @@ export default (domains, global) => { config['location = /favicon.ico'] = { log_not_found: 'off', }; - if (global.logging.accessLog.computed) config['location = /favicon.ico'].access_log = 'off'; config['# robots.txt'] = ''; config['location = /robots.txt'] = { log_not_found: 'off', }; - if (global.logging.accessLog.computed) config['location = /robots.txt'].access_log = 'off'; if (global.performance.disableHtmlCaching.computed) { // Disable HTML caching for changes take effect in time @@ -48,7 +46,6 @@ export default (domains, global) => { config[loc] = { add_header: 'Cache-Control "no-cache"', }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } @@ -61,7 +58,6 @@ export default (domains, global) => { config[loc] = { expires: global.performance.assetsExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } } else { // Assets & media separately @@ -71,7 +67,6 @@ export default (domains, global) => { config[loc] = { expires: global.performance.assetsExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } if (global.performance.mediaExpiration.computed) { @@ -80,7 +75,6 @@ export default (domains, global) => { config[loc] = { expires: global.performance.mediaExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } } @@ -93,7 +87,6 @@ export default (domains, global) => { add_header: 'Access-Control-Allow-Origin "*"', expires: global.performance.svgExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } } else { // SVG & fonts separately @@ -104,7 +97,6 @@ export default (domains, global) => { add_header: 'Access-Control-Allow-Origin "*"', expires: global.performance.svgExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } if (global.performance.fontsExpiration.computed) { @@ -114,7 +106,6 @@ export default (domains, global) => { add_header: 'Access-Control-Allow-Origin "*"', expires: global.performance.fontsExpiration.computed, }; - if (global.logging.accessLog.computed) config[loc].access_log = 'off'; } } } diff --git a/src/nginxconfig/generators/conf/nginx.conf.js b/src/nginxconfig/generators/conf/nginx.conf.js index e2feb5f..74308a2 100644 --- a/src/nginxconfig/generators/conf/nginx.conf.js +++ b/src/nginxconfig/generators/conf/nginx.conf.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +import { errorLogPathDisabled } from '../../util/logging'; import sslProfiles from '../../util/ssl_profiles'; import websiteConf from './website.conf'; @@ -107,8 +108,13 @@ export default (domains, global) => { } config.http.push(['# Logging', '']); - config.http.push(['access_log', (global.logging.accessLog.computed.trim() + (global.logging.cloudflare.computed ? ' cloudflare' : '')) || 'off']); - config.http.push(['error_log', global.logging.errorLog.computed.trim() || '/dev/null']); + config.http.push(['access_log', 'off']); + if (global.logging.errorLogEnabled.computed) { + config.http.push(['error_log', global.logging.errorLogPath.computed.trim() + + ` ${global.logging.errorLogLevel.computed}`]); + } else { + config.http.push(['error_log', errorLogPathDisabled]); + } if (global.security.limitReq.computed) { config.http.push(['# Limits', '']); diff --git a/src/nginxconfig/generators/conf/website.conf.js b/src/nginxconfig/generators/conf/website.conf.js index 0363f5d..151f85b 100644 --- a/src/nginxconfig/generators/conf/website.conf.js +++ b/src/nginxconfig/generators/conf/website.conf.js @@ -25,8 +25,8 @@ THE SOFTWARE. */ import { getSslCertificate, getSslCertificateKey } from '../../util/get_ssl_certificate'; -import { getAccessLogDomainPath, getErrorLogDomainPath } from '../../util/get_log_paths'; import { extensions, gzipTypes } from '../../util/types_extensions'; +import { getDomainAccessLog, getDomainErrorLog } from '../../util/logging'; import commonHsts from '../../util/common_hsts'; import securityConf from './security.conf'; import pythonConf from './python_uwsgi.conf'; @@ -127,6 +127,19 @@ const httpRedirectConfig = (domain, global, ipPortPairs, domainName, redirectDom config.push(...httpListen(domain, global, ipPortPairs)); config.push(['server_name', domainName]); + // Logging + if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) { + config.push(['# logging', '']); + + if (domain.logging.redirectAccessLog.computed) { + config.push(['access_log', getDomainAccessLog(domain, global)]); + } + + if (domain.logging.redirectErrorLog.computed) { + config.push(['error_log', getDomainErrorLog(domain)]); + } + } + if (domain.https.certType.computed === 'letsEncrypt') { // Let's encrypt @@ -221,15 +234,14 @@ export default (domain, domains, global, ipPortPairs) => { } // Access log or error log for domain - if (domain.logging.accessLog.computed || domain.logging.errorLog.computed) { + if (domain.logging.accessLogEnabled.computed || domain.logging.errorLogEnabled.computed) { serverConfig.push(['# logging', '']); - if (domain.logging.accessLog.computed) - serverConfig.push(['access_log', - getAccessLogDomainPath(domain, global) + (global.logging.cloudflare.computed ? ' cloudflare' : '')]); + if (domain.logging.accessLogEnabled.computed) + serverConfig.push(['access_log', getDomainAccessLog(domain, global)]); - if (domain.logging.errorLog.computed) - serverConfig.push(['error_log', getErrorLogDomainPath(domain, global)]); + if (domain.logging.errorLogEnabled.computed) + serverConfig.push(['error_log', getDomainErrorLog(domain)]); } // index.php @@ -411,7 +423,19 @@ export default (domain, domains, global, ipPortPairs) => { // HTTPS redirectConfig.push(...sslConfig(domain, global)); + + // Logging + if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) { + redirectConfig.push(['# logging', '']); + if (domain.logging.redirectAccessLog.computed) { + redirectConfig.push(['access_log', getDomainAccessLog(domain, global)]); + } + if (domain.logging.redirectErrorLog.computed) { + redirectConfig.push(['error_log', getDomainErrorLog(domain)]); + } + } + redirectConfig.push(['return', `301 http${domain.https.https.computed ? 's' : ''}://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}$request_uri`]); diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/logging.js b/src/nginxconfig/i18n/de/templates/domain_sections/logging.js index bbe0b08..285f24b 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -27,4 +27,7 @@ THE SOFTWARE. export default { byDomain: 'der Domain', enableForThisDomain: 'Für diese Domain aktivieren', + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/de/templates/global_sections/logging.js b/src/nginxconfig/i18n/de/templates/global_sections/logging.js index 148c2d0..351d3c0 100644 --- a/src/nginxconfig/i18n/de/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/de/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} "Seite nicht gefunden" Error Logging in`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'Füge Cloudflare Anfrage-Header dem Standard Log-Format hinzu', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/logging.js b/src/nginxconfig/i18n/en/templates/domain_sections/logging.js index 16f42e7..342d4b9 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'by domain', enableForThisDomain: `${common.enable} for this domain`, + arguments: 'arguments', + level: 'logging level', + forRedirects: 'for redirects', }; diff --git a/src/nginxconfig/i18n/en/templates/global_sections/logging.js b/src/nginxconfig/i18n/en/templates/global_sections/logging.js index 26e6db9..d31315a 100644 --- a/src/nginxconfig/i18n/en/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/en/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} file not found error logging in`, logformat: 'log_format', + level: 'logging level', enableCloudflare: 'add Cloudflare request headers to the default log format', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/logging.js b/src/nginxconfig/i18n/es/templates/domain_sections/logging.js index 3a04692..e30750e 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'por dominio', enableForThisDomain: `${common.enable} para este dominio`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/es/templates/global_sections/logging.js b/src/nginxconfig/i18n/es/templates/global_sections/logging.js index c8985be..a9ce17a 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} el registro de error de archivo no encontrado`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/logging.js b/src/nginxconfig/i18n/fr/templates/domain_sections/logging.js index 51d9cfb..9b46e2c 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'par domaine', enableForThisDomain: `${common.enable} pour ce domaine`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/fr/templates/global_sections/logging.js b/src/nginxconfig/i18n/fr/templates/global_sections/logging.js index ccce5bf..a401765 100644 --- a/src/nginxconfig/i18n/fr/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/fr/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} les erreurs de fichiers introuvables lors de la journalisation`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'ajouter les en-têtes de requête CloudFlare au format de journal par défaut', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/ja/templates/domain_sections/logging.js b/src/nginxconfig/i18n/ja/templates/domain_sections/logging.js index b1ff230..bcefbef 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/logging.js @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: '(ドメインごと)', enableForThisDomain: `このドメインで${common.enable}`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/ja/templates/global_sections/logging.js b/src/nginxconfig/i18n/ja/templates/global_sections/logging.js index 0a85911..990d68a 100644 --- a/src/nginxconfig/i18n/ja/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/ja/templates/global_sections/logging.js @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `FILE NOT FOUND エラーのロギングを${common.enable}`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'デフォルトのログフォーマットに Cloudflare のリクエストヘッダを追加する', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/logging.js b/src/nginxconfig/i18n/pl/templates/domain_sections/logging.js index 5e02483..2bab9ee 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'wg. domen', enableForThisDomain: `${common.enable} dla tej domeny`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pl/templates/global_sections/logging.js b/src/nginxconfig/i18n/pl/templates/global_sections/logging.js index 06937f6..f830ca1 100644 --- a/src/nginxconfig/i18n/pl/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/pl/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} logowanie błędów o nieznalezionych plikach`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'dodaj nagłówki żądań Cloudflare do domyślnego formatu dziennika ', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/logging.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/logging.js index b483d88..378acad 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'por domínio', enableForThisDomain: `${common.enable} para este domínio`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/global_sections/logging.js b/src/nginxconfig/i18n/pt-br/templates/global_sections/logging.js index 864b3da..418578b 100644 --- a/src/nginxconfig/i18n/pt-br/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/pt-br/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} erro de arquivo não encontrado ao fazer login`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'adicionar cabeçalhos de solicitação Cloudflare ao formato de log padrão', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js b/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js index 1ad7d67..596f865 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: 'по домену', enableForThisDomain: `${common.enable} для этого домена`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/ru/templates/global_sections/logging.js b/src/nginxconfig/i18n/ru/templates/global_sections/logging.js index 19cfd71..5936a21 100644 --- a/src/nginxconfig/i18n/ru/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/ru/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable} логирование ошибок для файлов, которые не были найдены при запросе`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: 'добавить Cloudflare хедеры запроса в дефолтный формат логов', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/logging.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/logging.js index 48323b6..1e69b69 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: '在此站点', enableForThisDomain: `为此站点${common.enable}`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/zh-cn/templates/global_sections/logging.js b/src/nginxconfig/i18n/zh-cn/templates/global_sections/logging.js index f3f8b60..019dea7 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/zh-cn/templates/global_sections/logging.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2022 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable}“文件未找到”错误日志:`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: '将Cloudflare请求头部添加到默认日志格式', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/logging.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/logging.js index 20c9c93..a5260b8 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/logging.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/logging.js @@ -29,4 +29,7 @@ import common from '../../common'; export default { byDomain: '在此網域', enableForThisDomain: `為此網域${common.enable}`, + arguments: 'arguments', // TODO: translate + level: 'logging level', // TODO: translate + forRedirects: 'for redirects', // TODO: translate }; diff --git a/src/nginxconfig/i18n/zh-tw/templates/global_sections/logging.js b/src/nginxconfig/i18n/zh-tw/templates/global_sections/logging.js index a05d022..bb4c064 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/zh-tw/templates/global_sections/logging.js @@ -29,6 +29,7 @@ import common from '../../common'; export default { enableFileNotFoundErrorLogging: `${common.enable}「找不到檔案」錯誤日誌:`, logformat: 'log_format', + level: 'logging level', // TODO: translate enableCloudflare: '將 Cloudflare 請求標頭加入預設日誌格式', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', diff --git a/src/nginxconfig/templates/domain_sections/https.vue b/src/nginxconfig/templates/domain_sections/https.vue index 71e2377..6bf8e13 100644 --- a/src/nginxconfig/templates/domain_sections/https.vue +++ b/src/nginxconfig/templates/domain_sections/https.vue @@ -227,6 +227,7 @@ THE SOFTWARE. import ExternalLink from 'do-vue/src/templates/external_link'; import delegatedFromDefaults from '../../util/delegated_from_defaults'; import computedFromDefaults from '../../util/computed_from_defaults'; + import { serverDomainDefault } from '../../util/defaults'; import PrettyCheck from '../inputs/checkbox'; import PrettyRadio from '../inputs/radio'; @@ -269,7 +270,7 @@ THE SOFTWARE. }, letsEncryptEmail: { default: '', - computed: 'info@example.com', // No default value, but a default computed + computed: `info@${serverDomainDefault}`, // No default value, but a default computed enabled: true, }, sslCertificate: { diff --git a/src/nginxconfig/templates/domain_sections/logging.vue b/src/nginxconfig/templates/domain_sections/logging.vue index 3335a0e..f0770d6 100644 --- a/src/nginxconfig/templates/domain_sections/logging.vue +++ b/src/nginxconfig/templates/domain_sections/logging.vue @@ -26,35 +26,124 @@ THE SOFTWARE.