forked from waltermoreira/abaco
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathnginx.conf
More file actions
139 lines (105 loc) · 4.8 KB
/
nginx.conf
File metadata and controls
139 lines (105 loc) · 4.8 KB
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
user nginx;
worker_processes 5;
error_log /dev/stdout notice;
#pid logs/nginx.pid;
events {
worker_connections 4096;
}
http {
include mime.types;
resolver 127.0.0.11;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
#include /etc/nginx/conf.d/*conf;
# Configuration for actors.
server {
listen 80;
resolver 127.0.0.11;
charset utf-8;
access_log /dev/stdout;
location /docs {
root /;
}
location ~* ^/actors/admin(.*) {
proxy_pass http://admin:5000/actors/admin$1$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~* ^/actors/(.*)/messages(.*) {
proxy_pass http://mes:5000/actors/$1/messages$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~ ^/actors/search/(.*) {
proxy_pass http://reg:5000/actors/search/$1$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~ /actors/(.*)/workers(.*) {
proxy_pass http://admin:5000/actors/$1/workers$2$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~ /actors/aliases/(.*)/permissions {
proxy_pass http://admin:5000/actors/aliases/$1/permissions$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~ /actors/(.*)/permissions {
proxy_pass http://admin:5000/actors/$1/permissions$is_args$args;
proxy_set_header Host localhost:5000;
}
location ~ ^/actors(.*) {
proxy_pass http://reg:5000/actors$1$is_args$args;
proxy_set_header Host localhost:5000;
}
# custom 40x errors:
error_page 400 /400.json;
location /400.json {
return 400 '{"status": "error", "message": "Invalid request: The Abaco service does not know how to fulfill the request.", "version": "unknown", "result": null}';
}
error_page 401 /401.json;
location /401.json {
return 401 '{"status": "error", "message": "Invalid request: The Abaco service does not know how to fulfill the request.", "version": "unknown", "result": null}';
}
error_page 402 /402.json;
location /402.json {
return 402 '{"status": "error", "message": "Invalid request: The Abaco service does not know how to fulfill the request.", "version": "unknown", "result": null}';
}
error_page 403 /403.json;
location /403.json {
return 403 '{"status": "error", "message": "Invalid request: The Abaco service does not know how to fulfill the request.", "version": "unknown", "result": null}';
}
error_page 404 /404.json;
location /404.json {
return 404 '{"status": "error", "message": "Invalid request: the requested URL is not an Abaco endpoint.", "version": "unknown", "result": null}';
}
error_page 405 /405.json;
location /405.json {
return 405 '{"status": "error", "message": "Invalid request: The Abaco service does not know how to fulfill the request.", "version": "unknown", "result": null}';
}
# custom 50x errors:
error_page 500 500.json;
location /500.json{
return 500 '{"status": "error", "message": "Unable to parse Abaco service response. The server may be misconfigured or overloaded.", "version": "unknown", "result": null}';
}
error_page 501 501.json;
location /501.json{
return 501 '{"status": "error", "message": "Unable to parse Abaco service response. The server may be misconfigured or overloaded.", "version": "unknown", "result": null}';
}
error_page 502 502.json;
location /502.json{
return 502 '{"status": "error", "message": "Timeout error waiting on Abaco service response. The server may be busy or overloaded.", "version": "unknown", "result": null}';
}
error_page 503 503.json;
location /503.json{
return 503 '{"status": "error", "message": "Unable to parse Abaco service response. The server may be misconfigured or overloaded.", "version": "unknown", "result": null}';
}
error_page 504 504.json;
location /504.json{
return 504 '{"status": "error", "message": "Unable to parse Abaco service response. The server may be misconfigured or overloaded.", "version": "unknown", "result": null}';
}
}
}