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/.github/workflows/do-spaces-workflow.yml b/.github/workflows/do-spaces-workflow.yml index 8130982..e74a8e5 100644 --- a/.github/workflows/do-spaces-workflow.yml +++ b/.github/workflows/do-spaces-workflow.yml @@ -2,17 +2,21 @@ name: Deploy to DigitalOcean Spaces on: push +permissions: + contents: write + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3.5.0 + - name: Use Node.js + uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" + node-version-file: .nvmrc cache: npm - name: Setup NPM @@ -40,7 +44,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: ${{ secrets.SPACES_REGION }} - - name: Leave a comment + - name: Leave a comment on commit run: npm run deploy:spaces:comment env: REPO_NAME: ${{ github.repository }} diff --git a/.github/workflows/gh-pages-workflow.yml b/.github/workflows/gh-pages-workflow.yml index a87bb9f..1e66653 100644 --- a/.github/workflows/gh-pages-workflow.yml +++ b/.github/workflows/gh-pages-workflow.yml @@ -5,17 +5,25 @@ on: branches: - master +permissions: + contents: write + +concurrency: + group: gh-pages-workflow + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3.5.0 + - name: Use Node.js + uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" + node-version-file: .nvmrc cache: npm - name: Setup NPM @@ -40,9 +48,8 @@ jobs: NODE_ENV: production - name: Deploy master to GitHub Pages - uses: JamesIves/github-pages-deploy-action@2.0.0 - env: - ACCESS_TOKEN: ${{ secrets.DEV_GITHUB_TOKEN }} - BASE_BRANCH: master - BRANCH: gh-pages - FOLDER: dist + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + clean: true + single-commit: true diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index a0f32c8..e64c8c2 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -7,12 +7,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3.5.0 + - name: Use Node.js + uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" + node-version-file: .nvmrc cache: npm - name: Setup NPM @@ -35,12 +36,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3.5.0 + - name: Use Node.js + uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" + node-version-file: .nvmrc cache: npm - name: Setup NPM @@ -63,12 +65,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Setup Node - uses: actions/setup-node@v3.5.0 + - name: Use Node.js + uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" + node-version-file: .nvmrc cache: npm - name: Setup NPM 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/domain_sections/php.js b/src/nginxconfig/i18n/de/templates/domain_sections/php.js index 6ce419c..1daaef8 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php} Backup Server`, tcp: 'TCP', hhvmSocket: 'HHVM Socket', - php5Socket: '5.x Socket', php70Socket: '7.0 Socket', php71Socket: '7.1 Socket', php72Socket: '7.2 Socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 Socket', php80Socket: '8.0 Socket', php81Socket: '8.1 Socket', + php82Socket: '8.2 Socket', phpSocket: 'PHP Socket', custom: 'Benutzerdefiniert', disabled: 'Deaktiviert', 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/domain_sections/php.js b/src/nginxconfig/i18n/en/templates/domain_sections/php.js index 15581fd..bb8414d 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php} backup server`, tcp: 'TCP', hhvmSocket: 'HHVM socket', - php5Socket: '5.x socket', php70Socket: '7.0 socket', php71Socket: '7.1 socket', php72Socket: '7.2 socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 socket', php80Socket: '8.0 socket', php81Socket: '8.1 socket', + php82Socket: '8.2 socket', phpSocket: 'PHP socket', custom: 'Custom', disabled: 'Disabled', 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/domain_sections/php.js b/src/nginxconfig/i18n/es/templates/domain_sections/php.js index f3f67ad..c0f82ac 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `Servidor ${common.php} de respaldo`, tcp: 'TCP', hhvmSocket: 'HHVM socket', - php5Socket: '5.x socket', php70Socket: '7.0 socket', php71Socket: '7.1 socket', php72Socket: '7.2 socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 socket', php80Socket: '8.0 socket', php81Socket: '8.1 socket', + php82Socket: '8.2 socket', phpSocket: 'PHP socket', custom: 'Personalizado', disabled: 'Desactivado', 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/domain_sections/php.js b/src/nginxconfig/i18n/fr/templates/domain_sections/php.js index 23282b4..41e89df 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `Serveur de sauvegarde ${common.php}`, tcp: 'TCP', hhvmSocket: 'Socket HHVM', - php5Socket: 'Socket 5.x', php70Socket: 'Socket 7.0', php71Socket: 'Socket 7.1', php72Socket: 'Socket 7.2', @@ -51,6 +50,7 @@ export default { php74Socket: 'Socket 7.4', php80Socket: 'Socket 8.0', php81Socket: 'Socket 8.1', + php82Socket: 'Socket 8.2', phpSocket: 'Socket PHP', custom: 'Custom', disabled: 'Désactivé', 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/domain_sections/php.js b/src/nginxconfig/i18n/ja/templates/domain_sections/php.js index cae645e..12238b9 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php} バックアップサーバ`, tcp: 'TCP', hhvmSocket: 'HHVM socket', - php5Socket: '5.x socket', php70Socket: '7.0 socket', php71Socket: '7.1 socket', php72Socket: '7.2 socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 socket', php80Socket: '8.0 socket', php81Socket: '8.1 socket', + php82Socket: '8.2 socket', phpSocket: 'PHP socket', custom: 'カスタム', disabled: '無効', 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/domain_sections/php.js b/src/nginxconfig/i18n/pl/templates/domain_sections/php.js index 3b3eb6f..e0d60ea 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `serwer backupowy ${common.php}`, tcp: 'TCP', hhvmSocket: 'HHVM socket', - php5Socket: '5.x socket', php70Socket: '7.0 socket', php71Socket: '7.1 socket', php72Socket: '7.2 socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 socket', php80Socket: '8.0 socket', php81Socket: '8.1 socket', + php82Socket: '8.2 socket', phpSocket: 'PHP socket', custom: 'Własny', disabled: 'Wyłączony', 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/domain_sections/php.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/php.js index a6cf3a6..0fcff9d 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `Servidor de backup ${common.php}`, tcp: 'TCP', hhvmSocket: 'Socket HHVM', - php5Socket: 'Socket 5.x', php70Socket: 'Socket 7.0', php71Socket: 'Socket 7.1', php72Socket: 'Socket 7.2', @@ -51,6 +50,7 @@ export default { php74Socket: 'Socket 7.4', php80Socket: 'Socket 8.0', php81Socket: 'Socket 8.1', + php82Socket: 'Socket 8.2', phpSocket: 'Socket PHP', custom: 'Custom', // TODO: translate disabled: 'Desabilitado', 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/domain_sections/php.js b/src/nginxconfig/i18n/ru/templates/domain_sections/php.js index 26ab4e8..5b72943 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php} бекап сервер`, tcp: 'TCP', hhvmSocket: 'HHVM сокет', - php5Socket: '5.x сокет', php70Socket: '7.0 сокет', php71Socket: '7.1 сокет', php72Socket: '7.2 сокет', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 сокет', php80Socket: '8.0 сокет', php81Socket: '8.1 сокет', + php82Socket: '8.2 сокет', phpSocket: 'PHP сокет', custom: 'Другой', disabled: 'Выключено', 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/domain_sections/php.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/php.js index b849ad6..72ab797 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php}备份服务器`, tcp: 'TCP', hhvmSocket: 'HHVM socket', - php5Socket: '5.x socket', php70Socket: '7.0 socket', php71Socket: '7.1 socket', php72Socket: '7.2 socket', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 socket', php80Socket: '8.0 socket', php81Socket: '8.1 socket', + php82Socket: '8.2 socket', phpSocket: 'PHP socket', custom: '自定义', disabled: '禁用', 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/domain_sections/php.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/php.js index 4c80e89..edb9c89 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/php.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/php.js @@ -43,7 +43,6 @@ export default { phpBackupServer: `${common.php} 備份伺服器`, tcp: 'TCP', hhvmSocket: 'HHVM 通訊端', - php5Socket: '5.x 通訊端', php70Socket: '7.0 通訊端', php71Socket: '7.1 通訊端', php72Socket: '7.2 通訊端', @@ -51,6 +50,7 @@ export default { php74Socket: '7.4 通訊端', php80Socket: '8.0 通訊端', php81Socket: '8.1 通訊端', + php82Socket: '8.2 通訊端', phpSocket: 'PHP 通訊端', custom: '自訂', disabled: '停用', 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.