chore(cr): additional logging comment
parent
269b34a821
commit
c03f6848f4
|
@ -128,12 +128,17 @@ const httpRedirectConfig = (domain, global, ipPortPairs, domainName, redirectDom
|
||||||
config.push(['server_name', domainName]);
|
config.push(['server_name', domainName]);
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) {
|
||||||
|
config.push(['# logging', '']);
|
||||||
|
|
||||||
if (domain.logging.redirectAccessLog.computed) {
|
if (domain.logging.redirectAccessLog.computed) {
|
||||||
config.push(['access_log', getDomainAccessLog(domain, global)]);
|
config.push(['access_log', getDomainAccessLog(domain, global)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain.logging.redirectErrorLog.computed) {
|
if (domain.logging.redirectErrorLog.computed) {
|
||||||
config.push(['error_log', getDomainErrorLog(domain)]);
|
config.push(['error_log', getDomainErrorLog(domain)]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (domain.https.certType.computed === 'letsEncrypt') {
|
if (domain.https.certType.computed === 'letsEncrypt') {
|
||||||
// Let's encrypt
|
// Let's encrypt
|
||||||
|
@ -420,12 +425,16 @@ export default (domain, domains, global, ipPortPairs) => {
|
||||||
redirectConfig.push(...sslConfig(domain, global));
|
redirectConfig.push(...sslConfig(domain, global));
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) {
|
||||||
|
redirectConfig.push(['# logging', '']);
|
||||||
|
|
||||||
if (domain.logging.redirectAccessLog.computed) {
|
if (domain.logging.redirectAccessLog.computed) {
|
||||||
redirectConfig.push(['access_log', getDomainAccessLog(domain, global)]);
|
redirectConfig.push(['access_log', getDomainAccessLog(domain, global)]);
|
||||||
}
|
}
|
||||||
if (domain.logging.redirectErrorLog.computed) {
|
if (domain.logging.redirectErrorLog.computed) {
|
||||||
redirectConfig.push(['error_log', getDomainErrorLog(domain)]);
|
redirectConfig.push(['error_log', getDomainErrorLog(domain)]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
redirectConfig.push(['return',
|
redirectConfig.push(['return',
|
||||||
`301 http${domain.https.https.computed ? 's' : ''}://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}$request_uri`]);
|
`301 http${domain.https.https.computed ? 's' : ''}://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}$request_uri`]);
|
||||||
|
|
Loading…
Reference in New Issue