-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeteor.conf
129 lines (125 loc) · 4.07 KB
/
meteor.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream meteor_server {
server 192.168.0.23:88; #local ip and port of meteor docker instance
ip_hash;
}
server {
server_name *.scichina.com;
client_max_body_size 80M;
## performance boost using gzip
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# end of GZIP block
location = /favicon.ico {
root /bundle/bundle/programs/web.browser/app;
access_log off;
expires 1w;
}
location ~* "^/[a-z0-9]{40}\.js$" {
root /bundle/bundle/programs/web.browser;
access_log off;
expires max;
}
location ~ "^/packages" {
root /bundle/bundle/programs/web.browser;
access_log off;
}
location / {
proxy_pass http://meteor_server;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
# Make sure to use WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /nginx_status {
stub_status on;
access_log off;
#allow 192.168.0.0/24;
#allow 124.17.0.0/24;
#deny all;
}
}
## example redirect to journal by subdomain
server {
server_name lifecn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSV";
}
server {
server_name chemcn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSC";
}
server {
server_name physcn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSPMA";
}
server {
server_name mathcn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSM";
}
server {
server_name earthcn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSTe";
}
server {
server_name infocn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SSI";
}
server {
server_name techcn.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SST";
}
server {
server_name csb.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/CSB";
}
server {
server_name www.scibull.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SB";
}
server {
server_name math.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCM";
}
server {
server_name chem.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCC";
}
server {
server_name life.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCLS";
}
server {
server_name earth.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCES";
}
server {
server_name tech.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCTS";
}
server {
server_name info.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCIS";
}
server {
server_name phys.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCPMA";
}
server {
server_name mater.scichina.com;
return 301 "http://engine.scichina.com/publisher/scp/journal/SCMs";
}
}