-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-vhost.conf
41 lines (32 loc) · 1.12 KB
/
nginx-vhost.conf
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
30
31
32
33
34
35
36
37
38
39
40
41
# apt.spunkybot.de
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80; ## listen for ipv6
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name apt.spunkybot.de;
ssl_certificate /etc/letsencrypt/live/apt.spunkybot.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/apt.spunkybot.de/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/apt.spunkybot.de/chain.pem;
# include SSL configuration
include snippets/ssl-config.conf;
add_header Strict-Transport-Security "max-age=15768000";
## ROOT directory
root /var/www/spunkybot.de/apt;
## DEFAULT INDEX
index index.html;
# deny access to internal folders
location ~ /(db|conf|incoming)/ {
deny all;
}
location ~ /(pool|dists)/ {
autoindex on;
}
# deny access to .git files and folder
location ~ /.git {
deny all;
}
location / {
try_files $uri $uri/ /index.html;
}
}