-
-
Notifications
You must be signed in to change notification settings - Fork 302
/
nginx.conf
48 lines (41 loc) · 1.63 KB
/
nginx.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
worker_processes 1;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
include /etc/nginx/mime.types;
client_max_body_size 10G;
sendfile on;
client_header_timeout 3600;
client_body_timeout 3600;
keepalive_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
proxy_connect_timeout 3600;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /server/ {
proxy_pass http://sonic-server-gateway:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /server/v3/api-docs/swagger-config {
#WORKAROUND fixed knife4j doc base path
return 200 '{"configUrl":"/server/v3/api-docs/swagger-config","oauth2RedirectUrl":"","operationsSorter":"alpha","tagsSorter":"alpha","urls":[{"name":"sonic-server-controller","serviceName":"sonic-server-controller","url":"/server/api/controller/v3/api-docs?group=default","contextPath":"/server/api/controller","order":1},{"name":"sonic-server-folder","serviceName":"sonic-server-folder","url":"/server/api/folder/v3/api-docs?group=default","contextPath":"/server/api/folder","order":2}],"validatorUrl":""}';
}
location /chrome/ {
proxy_pass http://localhost:9222/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}