24 lines
632 B
Plaintext
24 lines
632 B
Plaintext
server {
|
|
listen *:80;
|
|
listen [::]:80;
|
|
server_name {{ NITTER_DOMAIN }};
|
|
return 301 "https://$host$request_uri";
|
|
}
|
|
|
|
server {
|
|
listen *:443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name {{ NITTER_DOMAIN }};
|
|
access_log off;
|
|
error_log "/var/log/nginx/{{ NITTER_DOMAIN }}.error.log";
|
|
ssl_certificate "/etc/ssl/letsencrypt/{{ NITTER_DOMAIN }}.crt";
|
|
ssl_certificate_key "/etc/ssl/letsencrypt/{{ NITTER_DOMAIN }}.pem";
|
|
ssl_stapling on;
|
|
resolver [::1] valid=300s;
|
|
add_header Strict-Transport-Security max-age=31536000;
|
|
location / {
|
|
proxy_pass http://127.0.0.1:{{ NITTER_PORT }};
|
|
|
|
}
|
|
}
|