This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/ansible/roles/static/templates/nginx.conf.j2

44 lines
1,005 B
Text
Raw Normal View History

server {
listen 80 default_server;
location /security.txt {
2023-02-25 14:14:32 +00:00
return 301 https://{{ domain_name_pim }}/.well-known/security.txt;
}
location /.well-known/security.txt {
2023-02-25 14:14:32 +00:00
return 301 https://{{ domain_name_pim }}/.well-known/security.txt;
}
}
server {
listen 80;
server_name {{ domain_name_pim }};
index index.html index.htm;
root /var/www/blog;
location /security.txt {
return 301 https://$host/.well-known/security.txt;
}
location /.well-known/security.txt {
add_header Content-Type 'text/plain';
add_header Cache-Control 'no-cache, no-store, must-revalidate';
add_header Pragma 'no-cache';
add_header Expires '0';
add_header Vary '*';
return 200 "Contact: mailto:pim@kunis.nl\nExpires: 1970-01-01T00:00:00.000Z\nPreferred-Languages: en,nl\n";
}
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
error_page 404 /404.html;
}