forked from Rohansi/RohBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
60 lines (49 loc) · 1.41 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
60
# nginx config
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=steam:64m max_size=256m inactive=24h;
proxy_temp_path /var/cache/nginx/tmp;
server {
listen 80;
server_name fpp.literallybrian.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name fpp.literallybrian.com;
ssl on;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
gzip on;
gzip_proxied any;
gzip_min_length 128;
gzip_comp_level 4;
gzip_types text/css application/x-javascript;
proxy_intercept_errors on;
location / {
root /path/to/www;
index index.htm;
expires 7d;
}
location /ws/ {
proxy_pass http://localhost:12000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header User-Agent: $http_user_agent;
}
location /steamcommunity/ {
proxy_cache steam;
proxy_cache_valid 30d;
error_page 404 =200 /avatar.png;
proxy_pass http://media.steampowered.com/steamcommunity/;
proxy_hide_header "Age";
expires 30d;
}
location /economy/ {
proxy_cache steam;
proxy_cache_valid 30d;
proxy_pass http://cdn.steamcommunity.com/economy/;
proxy_hide_header "Age";
expires 30d;
}
}