blob: 563207ce54d8b6fb380f601cd19bc553551d1de8 (
plain)
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
|
server {
listen 80;
server_name copyninja.info www.copyninja.info;
#redirect all traffic to https
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name copyninja.info www.copyninja.info;
ssl on;
ssl_certificate /etc/letsencrypt/live/copyninja.info-0001/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/copyninja.info-0001/privkey.pem;
include /etc/nginx/conf.d/ssl.conf;
root /srv/copyninja.info/;
index index.html index.htm;
# Caching static files
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
# allow letsencrypt
location ~ /.well-known {
allow all;
}
try_files $uri $uri/index.html $uri.html =404;
}
|