ansible-role-prometheus-nod.../templates/nginx.conf.j2

29 lines
704 B
Django/Jinja

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ node_exporter_domain }};
ssl_certificate {{ certs_dir }}/{{ node_exporter_cert }}/fullchain;
ssl_certificate_key {{ certs_dir }}/{{ node_exporter_cert }}/key;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
access_log off;
error_log off;
location /metrics {
proxy_pass http://localhost:9100/metrics;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
server {
listen 80;
listen [::]:80;
server_name tech.ag-link.xyz;
return 301 https://{{ node_exporter_domain }}$request_uri;
}