mirror of
https://github.com/ordinary-dev/nixos-config.git
synced 2024-09-20 03:40:29 +05:00
feat: enable nginx access log
This commit is contained in:
parent
84b4c2b0a7
commit
e26d4f9722
|
@ -16,6 +16,15 @@ in {
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
|
||||||
|
appendHttpConfig = ''
|
||||||
|
map $status $loggable {
|
||||||
|
~^[23] 0;
|
||||||
|
default 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log combined if=$loggable;
|
||||||
|
'';
|
||||||
|
|
||||||
commonHttpConfig = ''
|
commonHttpConfig = ''
|
||||||
# Add HSTS header with preloading to HTTPS requests.
|
# Add HSTS header with preloading to HTTPS requests.
|
||||||
# Adding this header to HTTP requests is discouraged
|
# Adding this header to HTTP requests is discouraged
|
||||||
|
|
Loading…
Reference in a new issue