chore: global `access_log` should always be `off`
parent
7cd2d1804b
commit
b4fef1ab39
|
@ -33,13 +33,11 @@ export default (domains, global) => {
|
|||
config['location = /favicon.ico'] = {
|
||||
log_not_found: 'off',
|
||||
};
|
||||
if (global.logging.accessLogEnabled.computed) config['location = /favicon.ico'].access_log = 'off';
|
||||
|
||||
config['# robots.txt'] = '';
|
||||
config['location = /robots.txt'] = {
|
||||
log_not_found: 'off',
|
||||
};
|
||||
if (global.logging.accessLogEnabled.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.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,7 +58,6 @@ export default (domains, global) => {
|
|||
config[loc] = {
|
||||
expires: global.performance.assetsExpiration.computed,
|
||||
};
|
||||
if (global.logging.accessLogEnabled.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.accessLogEnabled.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.accessLogEnabled.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.accessLogEnabled.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.accessLogEnabled.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.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,14 +107,7 @@ export default (domains, global) => {
|
|||
}
|
||||
|
||||
config.http.push(['# Logging', '']);
|
||||
if (global.logging.accessLogEnabled.computed) {
|
||||
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']);
|
||||
}
|
||||
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}`]);
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} "Seite nicht gefunden" Error Logging in`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'Füge Cloudflare Anfrage-Header dem Standard Log-Format hinzu',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} file not found error logging in`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments',
|
||||
level: 'logging level',
|
||||
enableCloudflare: 'add Cloudflare request headers to the default log format',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} el registro de error de archivo no encontrado`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} les erreurs de fichiers introuvables lors de la journalisation`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
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',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `FILE NOT FOUND エラーのロギングを${common.enable}`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'デフォルトのログフォーマットに Cloudflare のリクエストヘッダを追加する',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} logowanie błędów o nieznalezionych plikach`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'dodaj nagłówki żądań Cloudflare do domyślnego formatu dziennika ',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} erro de arquivo não encontrado ao fazer login`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'adicionar cabeçalhos de solicitação Cloudflare ao formato de log padrão',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable} логирование ошибок для файлов, которые не были найдены при запросе`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: 'добавить Cloudflare хедеры запроса в дефолтный формат логов',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable}“文件未找到”错误日志:`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: '将Cloudflare请求头部添加到默认日志格式',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -29,7 +29,6 @@ import common from '../../common';
|
|||
export default {
|
||||
enableFileNotFoundErrorLogging: `${common.enable}「找不到檔案」錯誤日誌:`,
|
||||
logformat: 'log_format',
|
||||
arguments: 'arguments', // TODO: translate
|
||||
level: 'logging level', // TODO: translate
|
||||
enableCloudflare: '將 Cloudflare 請求標頭加入預設日誌格式',
|
||||
cfRay: 'CF-Ray',
|
||||
|
|
|
@ -26,49 +26,6 @@ THE SOFTWARE.
|
|||
|
||||
<template>
|
||||
<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-label has-small-margin-top">
|
||||
<label class="label">error_log</label>
|
||||
|
@ -209,23 +166,11 @@ THE SOFTWARE.
|
|||
<script>
|
||||
import delegatedFromDefaults from '../../util/delegated_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 PrettyRadio from '../inputs/radio';
|
||||
|
||||
const defaults = {
|
||||
accessLogEnabled: {
|
||||
default: false,
|
||||
enabled: true,
|
||||
},
|
||||
accessLogPath: {
|
||||
default: '/var/log/nginx/access.log',
|
||||
enabled: true,
|
||||
},
|
||||
accessLogParameters: {
|
||||
default: accessLogParamsDefault,
|
||||
enabled: true,
|
||||
},
|
||||
errorLogEnabled: {
|
||||
default: false,
|
||||
enabled: true,
|
||||
|
|
Loading…
Reference in New Issue