-
Notifications
You must be signed in to change notification settings - Fork 18
/
nginx.conf
54 lines (43 loc) · 1.86 KB
/
nginx.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
42
43
44
45
46
47
48
49
50
51
52
53
54
server {
listen 80;
server_name rakudo.org www.rakudo.org rakudo.perl6.org rakudo.p6c.org rakudo.rakulang.site;
include snippets/letsencrypt.conf;
return 301 https://$host$request_uri;
access_log /var/log/nginx/rakudo.org.access.log;
error_log /var/log/nginx/rakudo.org.error.log;
}
server {
listen 443 ssl; # managed by Certbot
server_name rakudo.org www.rakudo.org rakudo.perl6.org rakudo.p6c.org rakudo.rakulang.site;
ssl_certificate /etc/letsencrypt/live/rakudo.p6c.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/rakudo.p6c.org/privkey.pem; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/rakudo.p6c.org/chain.pem;
include snippets/letsencrypt.conf;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location ~ /downloads/star/(rakudo-star-\d\d\d\d\.\d\d.+)$ {
return 302 /dl/star/$1;
}
# 2019-08-11, rba add additional "redirects" based on https://github.com/rakudo/rakudo.org/issues/28
#location ~ /files/star/?$ { # for https://rakudo.perl6.org/downloads/star/ (used in docs.perl6.org)
# return 302 /downloads/star;
#}
# 2019-01-22 more generic /files -> /downloads
location ~ /files {
return 302 /downloads;
}
location ~ /how-to-help {
return 302 /community;
}
location / {
proxy_pass http://127.0.0.1:4242;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
access_log /var/log/nginx/rakudo.org.access.log;
error_log /var/log/nginx/rakudo.org.error.log;
}