services.nginx.commonHttpConfig
NixOS option
With nginx you must provide common http context definitions before they are used, e.g. log_format, resolver, etc. inside of server or location contexts. Use this attribute to set these definitions at the appropriate location.
type: strings concatenated with "\n"Default
""
Example
declared in: nixos/modules/services/web-servers/nginx/default.nixView source on NixOS/nixpkgs →''
resolver 127.0.0.1 valid=5s;
log_format myformat '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
''