forked from DMOJ/site-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
59 lines (48 loc) · 1.57 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
55
56
57
58
59
server {
listen 80;
listen [::]:80;
# Change port to 443 and do the nginx ssl stuff if you want it.
# Change server name to the HTTP hostname you are using.
# You may also make this the default server by listening with default_server,
# if you disable the default nginx server declared.
server_name dmoj.ca;
add_header X-UA-Compatible "IE=Edge,chrome=1";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
charset utf-8;
try_files $uri @icons;
error_page 502 504 /502.html;
location ~ ^/502\.html$|^/logo\.png$|^/robots\.txt$ {
root /site;
}
location @icons {
root /site/resources/icons;
}
location /static {
gzip_static on;
expires max;
root /site/;
}
# Uncomment if you are using PDFs and want to serve it faster.
# This location name should be set to PROBLEM_PDF_INTERNAL.
#location /pdfcache {
# internal;
# root <path to pdf cache diretory, without the final /pdfcache>;
#}
# Uncomment these sections if you are using the event server.
location /event/ {
proxy_pass http://127.0.0.1:15100/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
location /channels/ {
proxy_read_timeout 120;
proxy_pass http://127.0.0.1:15102;
}
location / {
proxy_read_timeout 120;
proxy_pass http://127.0.0.1:9090;
}
}