Separated log files per vhost

This commit is contained in:
Tobias Herre 2024-09-23 13:40:15 +02:00
parent 0f7edefe94
commit 2b4d9c0a28
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,8 @@ server {
alias {{vars.nginx.default_html_dir}}/.well-known/acme-challenge/;
try_files $uri $uri/ =404;
}
access_log /var/log/nginx/{{vars.nginx_vhost.site.domain}}.access.log;
error_log /var/log/nginx/{{vars.nginx_vhost.site.domain}}.error.log;
return 301 https://{{vars.nginx_vhost.site.domain}}$request_uri;
}
@ -51,6 +53,8 @@ server {
# ssl_dhparam /etc/nginx/dhparam.pem;
access_log /var/log/nginx/{{vars.nginx_vhost.site.domain}}.access.log;
error_log /var/log/nginx/{{vars.nginx_vhost.site.domain}}.error.log;
root {{vars.nginx_vhost.site.doc_root}};
{{{vars.nginx_vhost.site.raw}}}