Log requests

This commit is contained in:
niten 2024-05-24 10:39:44 -07:00
parent da28a1c26b
commit c2370eddb1
1 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,13 @@ in {
services.nginx = {
enable = true;
clientMaxBodySize = "1024M";
commonHttpConfig = ''
log_format with_response_time '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$request_time" "$upstream_response_time"';
access_log /var/log/nginx/access.log with_response_time;
'';
virtualHosts = genAttrs cfg.hostnames (hostname: {
enableACME = false;
forceSSL = false;