-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathhttp.conf
43 lines (34 loc) · 916 Bytes
/
http.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
server {
listen 80 default_server;
server_name default;
root /usr/share/nginx/html;
index index.html index.htm;
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}
location ~* \.(?:css|js)$ {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public";
}
location / {
try_files $uri $uri/ /index.html;
}
# retrieve submodule content from GitHub (`project-reclass/toynet-content`)
location ^~ /data/ {
resolver 127.0.0.11 8.8.8.8 8.4.4.8 ipv6=off valid=300s;
proxy_pass ${CURRICULUM_URI}$uri;
}
location /api {
proxy_pass ${SERVER_URI};
proxy_redirect off;
}
location ~ ^.+\..+$ {
try_files $uri =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}