aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/cargo/nginx.conf
blob: 467de675d6d6983ff2142f59de21b13639ff544b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
events {
  worker_connections 1024;
}
http {
  server {
    listen 8080 ssl http2;
    keepalive_timeout 70;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    ssl_ciphers HIGH:!aNULL:!MD5:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers on;
    ssl_certificate /etc/letsencrypt/live/cargo.terminaldweller.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/cargo.terminaldweller.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    add_header Content-Security-Policy "default-src 'self';";
    add_header X-Frame-Options SAMEORIGIN always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header Referrer-Policy "no-referrer";
    sendfile on;
    tcp_nopush on;

    location / {
      root /cargo;
      autoindex on;
      autoindex_localtime on;
      autoindex_exact_size on;
    }
  }
}