-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathgalaxyp_nginx.conf.template
147 lines (121 loc) · 4 KB
/
galaxyp_nginx.conf.template
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 4;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml text/javascript application/json;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
upstream galaxy_app {
server localhost:8080;
}
upstream cm_app {
server localhost:42284;
}
upstream protvis-site {
server 127.0.0.1:$protvis_port;
}
server {
listen 80;
client_max_body_size 2048m;
server_name localhost;
proxy_read_timeout 600;
location /cloud {
proxy_pass http://cm_app;
proxy_set_header X-Forwarded-Host $$host;
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for;
error_page 502 /errdoc/cm_502.html;
}
location /cloud/static {
alias /mnt/cm/static;
expires 24h;
}
location /cloud/static/style {
alias /mnt/cm/static/style;
expires 24h;
}
location /cloud/static/scripts {
alias /mnt/cm/static/scripts;
expires 24h;
}
location / {
proxy_pass http://galaxy_app;
proxy_set_header X-Forwarded-Host $$host;
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for;
}
location /static {
alias $galaxy_home/static;
expires 24h;
}
location /static/style {
alias $galaxy_home/static/june_2007_style/blue;
expires 24h;
}
location /static/scripts {
alias $galaxy_home/static/scripts/packed;
expires 24h;
}
location /robots.txt {
alias $galaxy_home/static/robots.txt;
}
location /favicon.ico {
alias $galaxy_home/static/favicon.ico;
}
location /_x_accel_redirect/ {
internal;
alias /;
}
location /_upload {
upload_store /mnt/galaxyData/upload_store;
upload_pass_form_field "";
upload_set_form_field "__$${upload_field_name}__is_composite" "true";
upload_set_form_field "__$${upload_field_name}__keys" "name path";
upload_set_form_field "$${upload_field_name}_name" "$$upload_file_name";
upload_set_form_field "$${upload_field_name}_path" "$$upload_tmp_path";
upload_pass_args on;
upload_pass /_upload_done;
}
location /_upload_done {
set $$dst /tool_runner/index;
if ($$args ~ nginx_redir=([^&]+)) {
set $$dst $$1;
}
rewrite "" $$dst;
}
error_page 502 /errdoc/502.html;
location /errdoc {
root html;
}
location /protvis {
rewrite ^/protvis/(.*) /\$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
client_max_body_size 16m;
client_body_buffer_size 128k;
proxy_connect_timeout 60s;
proxy_send_timeout 90s;
proxy_read_timeout 90s;
proxy_buffering off;
proxy_temp_file_write_size 64k;
proxy_pass http://protvis-site;
proxy_redirect off;
}
location /protvis/res/ {
alias $protvis_home/res/;
expires 30d;
add_header Cache-Control public;
access_log off;
}
}
}