-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx
143 lines (116 loc) · 3.92 KB
/
nginx
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
# /etc/nginx/sites-available/nginx
# sudo nginx -t
# sudo nginx -s reload
# https://nginx.org/en/docs/http/ngx_http_core_module.html#location
#
# If a location is defined by a prefix string that ends with the
# slash character, and requests are processed by one of proxy_pass,
# fastcgi_pass, uwsgi_pass, scgi_pass, memcached_pass, or grpc_pass,
# then the special processing is performed. In response to a request
# with URI equal to this string, but without the trailing slash, a
# permanent redirect with the code 301 will be returned to the
# requested URI with the slash appended. If this is not desired, an
# exact match of the URI and location could be defined like this:
#
# location /user/ {
# proxy_pass http://user.example.com;
# }
#
# location = /user {
# proxy_pass http://login.example.com;
# }
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name quest.ms.mff.cuni.cz textflow;
include /etc/nginx/proxy_params;
absolute_redirect off;
proxy_buffering off;
########
location /textflow/ {
proxy_pass http://127.0.0.1:5000;
location /textflow/send {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /textflow/1/ {
proxy_pass http://127.0.0.1:5001;
location /textflow/1/send {
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /textflow/2/ {
proxy_pass http://127.0.0.1:5002;
location /textflow/2/send {
proxy_pass http://127.0.0.1:5002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /textflow/3/ {
proxy_pass http://127.0.0.1:5003;
location /textflow/3/send {
proxy_pass http://127.0.0.1:5003;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
########
location /elitr/ {
proxy_pass http://127.0.0.1:6000;
location /elitr/send {
proxy_pass http://127.0.0.1:6000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /elitr/sg1/ {
proxy_pass http://127.0.0.1:6001;
location /elitr/sg1/send {
proxy_pass http://127.0.0.1:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /elitr/monday-seminars/ {
proxy_pass http://127.0.0.1:6002;
location /elitr/monday-seminars/send {
proxy_pass http://127.0.0.1:6002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
location /elitr/theaitre/ {
proxy_pass http://127.0.0.1:6003;
location /elitr/theaitre/send {
proxy_pass http://127.0.0.1:6003;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
########
location /elitr/debug/ {
proxy_pass http://127.0.0.1:7000;
location /elitr/debug/ws {
proxy_pass http://127.0.0.1:7000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}