forked from Coursemology/coursemology.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prox.config
38 lines (33 loc) · 851 Bytes
/
prox.config
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
upstream nodes {
ip_hash;
server 192.241.237.84:80;
}
server {
listen 80;
server_name coursemology.com www.coursemology.com;
root /var/www/coursemology/public;
location / {
client_max_body_size 50M;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://nodes;
break;
}
}
location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {
proxy_cache_valid 200 120m;
expires 604800;
proxy_pass http://apachesyslogtv;
proxy_cache cache;
}
}