feat: enable nginx access log

This commit is contained in:
Ivan R. 2024-03-04 19:35:42 +05:00
parent 84b4c2b0a7
commit e26d4f9722
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C

View file

@ -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