2021-02-15 09:01:20 +01:00
|
|
|
server {
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
2021-03-25 14:55:47 +01:00
|
|
|
server_name {{ node_exporter_domain }};
|
2021-02-15 09:01:20 +01:00
|
|
|
|
2021-03-25 15:49:02 +01:00
|
|
|
ssl_certificate {{ certs_dir }}/{{ node_exporter_cert }}/cert.pem;
|
|
|
|
ssl_certificate_key {{ certs_dir }}/{{ node_exporter_cert }}/key.pem;
|
2021-02-15 09:01:20 +01:00
|
|
|
ssl_session_timeout 1d;
|
2021-03-25 15:33:59 +01:00
|
|
|
ssl_session_cache shared:SSL:10m;
|
2021-02-15 09:01:20 +01:00
|
|
|
ssl_session_tickets off;
|
2022-03-19 13:39:55 +01:00
|
|
|
ssl_prefer_server_ciphers on;
|
2021-02-15 09:01:20 +01:00
|
|
|
|
|
|
|
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;
|
2021-03-25 14:55:47 +01:00
|
|
|
return 301 https://{{ node_exporter_domain }}$request_uri;
|
2021-02-15 09:01:20 +01:00
|
|
|
}
|
|
|
|
|