Move log_format to nginx.conf

log_format is only allowed in the http context and not in a server block. Otherwise you get the error "log_format" directive is not allowed here
This commit is contained in:
Anthony Wang 2024-04-06 15:39:28 +00:00
parent 42fb81a97a
commit 8c2b0854b9
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ

View file

@ -8,13 +8,9 @@ server {
root /srv/http/iacore;
log_format 1a-simple '[$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer"';
access_log /var/log/nginx/www.1a-insec.net-access.log 1a-simple;
access_log /var/log/nginx/www.1a-insec.net.access.log 1a-simple;
location / {
try_files $uri $uri.html $uri/ =404;
}
}