-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathcloudflow.nginx.conf
45 lines (38 loc) · 1.31 KB
/
cloudflow.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
server {
listen [::]:8000 ipv6only=off;
server_name localhost;
# to enable https, uncomment the following lines, and point to your cert and key files
#
#ssl_certificate /etc/nginx/ssl/nginx.crt;
#ssl_certificate_key /etc/nginx/ssl/nginx.key;
#listen [::]:8001 ssl ipv6only=off;
# For custom log, uncomment the following line and set the desired path of the log file
#
#access_log /var/log/nginx/cloudflow.access.log main;
# Redirect the /api/... requests to Mistral
#
location ~* ^/api {
rewrite ^/api/(.*) /v2/$1 break;
proxy_pass $scheme://localhost:8989;
}
# Serve all other requests as static files
# On 404, return index.html
#
location / {
root /opt/CloudFlow/dist;
index index.html;
try_files $uri /index.html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# gzip configuration
#
gzip on;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml
application/xml+rss text/javascript application/x-font-ttf font/opentype image/svg+xml image/x-ico;
}