Move to the TLSRef configuration generators Intermediate configuration profile as of 2026-12-04 with HSTS on and OCSP Stapling off. https://configurator.tlsref.org/#server=nginx&version=1.27.3&config=intermediate&openssl=4.0.1&hsts&guideline=6.0 Adjust the nginx roles tls.conf accordingly, modernize the hosts configs use of http2 and remove statements previously used because of OCSP stapling (ssl_trusted_certificate and resolver). Don't do OCSP stapling anymore, since it's deprecated. https://letsencrypt.org/2024/12/05/ending-ocsp
57 lines
1.7 KiB
Text
57 lines
1.7 KiB
Text
server {
|
|
allow ::1/128;
|
|
allow 127.0.0.1/32;
|
|
# Wieske
|
|
allow 172.31.17.128/25;
|
|
allow 212.12.51.128/28;
|
|
allow 2a00:14b0:42:100::/56; #Neues v6 gerouted via neuem Router
|
|
allow 2a00:14b0:4200:3000::/64; #Bei Wieske
|
|
allow 2a00:14b0:4200:3380::/64;
|
|
allow 2a00:14b0:f000:23::/64; #CCCHH v6 bei Wieske, geroutet über turing
|
|
# Z9
|
|
allow 2a07:c481:1::/48;
|
|
# fuxnoc
|
|
allow 2a07:c481::/36;
|
|
deny all;
|
|
|
|
server_name metrics.hamburg.ccc.de;
|
|
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
|
|
client_body_buffer_size 512k;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/metrics.hamburg.ccc.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/metrics.hamburg.ccc.de/privkey.pem;
|
|
|
|
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
|
|
auth_basic "metrics";
|
|
auth_basic_user_file metrics.htpasswd;
|
|
|
|
location /api/v1/write {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Port 3100;
|
|
# This is https in any case.
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
proxy_pass http://127.0.0.1:9090;
|
|
}
|
|
|
|
location /ready {
|
|
rewrite ^ /-/ready break;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# This is https in any case.
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
proxy_pass http://127.0.0.1:9090;
|
|
}
|
|
}
|