chore: global `access_log` should always be `off`
parent
7cd2d1804b
commit
b4fef1ab39
|
@ -33,13 +33,11 @@ export default (domains, global) => {
|
||||||
config['location = /favicon.ico'] = {
|
config['location = /favicon.ico'] = {
|
||||||
log_not_found: 'off',
|
log_not_found: 'off',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config['location = /favicon.ico'].access_log = 'off';
|
|
||||||
|
|
||||||
config['# robots.txt'] = '';
|
config['# robots.txt'] = '';
|
||||||
config['location = /robots.txt'] = {
|
config['location = /robots.txt'] = {
|
||||||
log_not_found: 'off',
|
log_not_found: 'off',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config['location = /robots.txt'].access_log = 'off';
|
|
||||||
|
|
||||||
if (global.performance.disableHtmlCaching.computed) {
|
if (global.performance.disableHtmlCaching.computed) {
|
||||||
// Disable HTML caching for changes take effect in time
|
// Disable HTML caching for changes take effect in time
|
||||||
|
@ -48,7 +46,6 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
add_header: 'Cache-Control "no-cache"',
|
add_header: 'Cache-Control "no-cache"',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +58,6 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.assetsExpiration.computed,
|
expires: global.performance.assetsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Assets & media separately
|
// Assets & media separately
|
||||||
|
@ -71,7 +67,6 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.assetsExpiration.computed,
|
expires: global.performance.assetsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.performance.mediaExpiration.computed) {
|
if (global.performance.mediaExpiration.computed) {
|
||||||
|
@ -80,7 +75,6 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.mediaExpiration.computed,
|
expires: global.performance.mediaExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +87,6 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.svgExpiration.computed,
|
expires: global.performance.svgExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// SVG & fonts separately
|
// SVG & fonts separately
|
||||||
|
@ -104,7 +97,6 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.svgExpiration.computed,
|
expires: global.performance.svgExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.performance.fontsExpiration.computed) {
|
if (global.performance.fontsExpiration.computed) {
|
||||||
|
@ -114,7 +106,6 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.fontsExpiration.computed,
|
expires: global.performance.fontsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,14 +107,7 @@ export default (domains, global) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
config.http.push(['# Logging', '']);
|
config.http.push(['# Logging', '']);
|
||||||
if (global.logging.accessLogEnabled.computed) {
|
config.http.push(['access_log', 'off']);
|
||||||
config.http.push(['access_log', global.logging.accessLogPath.computed.trim() +
|
|
||||||
(global.logging.cloudflare.computed ? ' cloudflare' : '') +
|
|
||||||
(global.logging.accessLogParameters.computed ? ` ${global.logging.accessLogParameters.computed.trim()}` : ''),
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
config.http.push(['access_log', 'off']);
|
|
||||||
}
|
|
||||||
if (global.logging.errorLogEnabled.computed) {
|
if (global.logging.errorLogEnabled.computed) {
|
||||||
config.http.push(['error_log', global.logging.errorLogPath.computed.trim() +
|
config.http.push(['error_log', global.logging.errorLogPath.computed.trim() +
|
||||||
` ${global.logging.errorLogLevel.computed}`]);
|
` ${global.logging.errorLogLevel.computed}`]);
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} "Seite nicht gefunden" Error Logging in`,
|
enableFileNotFoundErrorLogging: `${common.enable} "Seite nicht gefunden" Error Logging in`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'Füge Cloudflare Anfrage-Header dem Standard Log-Format hinzu',
|
enableCloudflare: 'Füge Cloudflare Anfrage-Header dem Standard Log-Format hinzu',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} file not found error logging in`,
|
enableFileNotFoundErrorLogging: `${common.enable} file not found error logging in`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments',
|
|
||||||
level: 'logging level',
|
level: 'logging level',
|
||||||
enableCloudflare: 'add Cloudflare request headers to the default log format',
|
enableCloudflare: 'add Cloudflare request headers to the default log format',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} el registro de error de archivo no encontrado`,
|
enableFileNotFoundErrorLogging: `${common.enable} el registro de error de archivo no encontrado`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro',
|
enableCloudflare: 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} les erreurs de fichiers introuvables lors de la journalisation`,
|
enableFileNotFoundErrorLogging: `${common.enable} les erreurs de fichiers introuvables lors de la journalisation`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'ajouter les en-têtes de requête CloudFlare au format de journal par défaut',
|
enableCloudflare: 'ajouter les en-têtes de requête CloudFlare au format de journal par défaut',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `FILE NOT FOUND エラーのロギングを${common.enable}`,
|
enableFileNotFoundErrorLogging: `FILE NOT FOUND エラーのロギングを${common.enable}`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'デフォルトのログフォーマットに Cloudflare のリクエストヘッダを追加する',
|
enableCloudflare: 'デフォルトのログフォーマットに Cloudflare のリクエストヘッダを追加する',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} logowanie błędów o nieznalezionych plikach`,
|
enableFileNotFoundErrorLogging: `${common.enable} logowanie błędów o nieznalezionych plikach`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'dodaj nagłówki żądań Cloudflare do domyślnego formatu dziennika ',
|
enableCloudflare: 'dodaj nagłówki żądań Cloudflare do domyślnego formatu dziennika ',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} erro de arquivo não encontrado ao fazer login`,
|
enableFileNotFoundErrorLogging: `${common.enable} erro de arquivo não encontrado ao fazer login`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'adicionar cabeçalhos de solicitação Cloudflare ao formato de log padrão',
|
enableCloudflare: 'adicionar cabeçalhos de solicitação Cloudflare ao formato de log padrão',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable} логирование ошибок для файлов, которые не были найдены при запросе`,
|
enableFileNotFoundErrorLogging: `${common.enable} логирование ошибок для файлов, которые не были найдены при запросе`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: 'добавить Cloudflare хедеры запроса в дефолтный формат логов',
|
enableCloudflare: 'добавить Cloudflare хедеры запроса в дефолтный формат логов',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable}“文件未找到”错误日志:`,
|
enableFileNotFoundErrorLogging: `${common.enable}“文件未找到”错误日志:`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: '将Cloudflare请求头部添加到默认日志格式',
|
enableCloudflare: '将Cloudflare请求头部添加到默认日志格式',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
||||||
export default {
|
export default {
|
||||||
enableFileNotFoundErrorLogging: `${common.enable}「找不到檔案」錯誤日誌:`,
|
enableFileNotFoundErrorLogging: `${common.enable}「找不到檔案」錯誤日誌:`,
|
||||||
logformat: 'log_format',
|
logformat: 'log_format',
|
||||||
arguments: 'arguments', // TODO: translate
|
|
||||||
level: 'logging level', // TODO: translate
|
level: 'logging level', // TODO: translate
|
||||||
enableCloudflare: '將 Cloudflare 請求標頭加入預設日誌格式',
|
enableCloudflare: '將 Cloudflare 請求標頭加入預設日誌格式',
|
||||||
cfRay: 'CF-Ray',
|
cfRay: 'CF-Ray',
|
||||||
|
|
|
@ -26,49 +26,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="field is-horizontal is-aligned-top">
|
|
||||||
<div class="field-label has-small-margin-top">
|
|
||||||
<label class="label">access_log</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-body">
|
|
||||||
<div class="field">
|
|
||||||
<div :class="`control${accessLogEnabledChanged ? ' is-changed' : ''}`">
|
|
||||||
<div class="checkbox">
|
|
||||||
<PrettyCheck v-model="accessLogEnabled" class="p-default p-curve p-fill p-icon">
|
|
||||||
{{ $t('common.enable') }}
|
|
||||||
</PrettyCheck>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="$props.data.accessLogEnabled.computed" :class="`control field is-horizontal is-expanded${accessLogPathChanged ? ' is-changed' : ''}`">
|
|
||||||
<input
|
|
||||||
v-model="accessLogPath"
|
|
||||||
class="input"
|
|
||||||
type="text"
|
|
||||||
:placeholder="$props.data.accessLogPath.default"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="$props.data.accessLogEnabled.computed" class="field is-horizontal">
|
|
||||||
<div class="field-label">
|
|
||||||
<label class="label">access_log {{ $t('templates.globalSections.logging.arguments') }}</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-body">
|
|
||||||
<div class="field">
|
|
||||||
<div :class="`control${accessLogParametersChanged ? ' is-changed' : ''}`">
|
|
||||||
<input
|
|
||||||
v-model="accessLogParameters"
|
|
||||||
class="input"
|
|
||||||
type="text"
|
|
||||||
:placeholder="$props.data.accessLogParameters.default"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field is-horizontal is-aligned-top">
|
<div class="field is-horizontal is-aligned-top">
|
||||||
<div class="field-label has-small-margin-top">
|
<div class="field-label has-small-margin-top">
|
||||||
<label class="label">error_log</label>
|
<label class="label">error_log</label>
|
||||||
|
@ -209,23 +166,11 @@ THE SOFTWARE.
|
||||||
<script>
|
<script>
|
||||||
import delegatedFromDefaults from '../../util/delegated_from_defaults';
|
import delegatedFromDefaults from '../../util/delegated_from_defaults';
|
||||||
import computedFromDefaults from '../../util/computed_from_defaults';
|
import computedFromDefaults from '../../util/computed_from_defaults';
|
||||||
import { accessLogParamsDefault, errorLogLevelDefault, errorLogLevelOptions } from '../../util/logging';
|
import { errorLogLevelDefault, errorLogLevelOptions } from '../../util/logging';
|
||||||
import PrettyCheck from '../inputs/checkbox';
|
import PrettyCheck from '../inputs/checkbox';
|
||||||
import PrettyRadio from '../inputs/radio';
|
import PrettyRadio from '../inputs/radio';
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
accessLogEnabled: {
|
|
||||||
default: false,
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
accessLogPath: {
|
|
||||||
default: '/var/log/nginx/access.log',
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
accessLogParameters: {
|
|
||||||
default: accessLogParamsDefault,
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
errorLogEnabled: {
|
errorLogEnabled: {
|
||||||
default: false,
|
default: false,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
Loading…
Reference in New Issue