ansible-infra/resources/chaosknoten/grafana/nginx/loki.hamburg.ccc.de.conf
June 18f8ae3e7c
modernize nginx configurations accross all hosts
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
2026-12-04 16:56:26 +01:00

85 lines
2.5 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:c480:0:100::/56;
allow 2a07:c481:1::/48;
deny all;
server_name loki.hamburg.ccc.de;
listen [::]:50051 ssl;
http2 on;
client_body_buffer_size 512k;
ssl_certificate /etc/letsencrypt/live/loki.hamburg.ccc.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/loki.hamburg.ccc.de/privkey.pem;
auth_basic "loki";
auth_basic_user_file loki.htpasswd;
location / {
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 9099;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Scope-OrgID $remote_user;
grpc_pass grpc://localhost:19099;
}
}
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:c480:0:100::/56;
allow 2a07:c481:1::/48;
deny all;
server_name loki.hamburg.ccc.de;
listen [::]:443 ssl;
http2 on;
client_body_buffer_size 512k;
ssl_certificate /etc/letsencrypt/live/loki.hamburg.ccc.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/loki.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 "loki";
auth_basic_user_file loki.htpasswd;
location / {
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_set_header X-Scope-OrgID $remote_user;
proxy_pass http://127.0.0.1:13100;
}
}