Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit a6d82ab

Browse files
committed
adjusted proxy for flower
1 parent a3e5f2b commit a6d82ab

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

nginx/flowerproxy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM nginx:1.18.0-alpine
2-
# COPY proxy.conf /etc/nginx/nginx.conf
2+
COPY proxy.conf /etc/nginx/nginx.conf
33
EXPOSE 80
44
CMD ["nginx", "-g", "daemon off;"]

nginx/flowerproxy/proxy.conf

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,46 @@
1414
# }
1515

1616

17-
server {
17+
# server {
18+
# listen 80;
19+
# charset utf-8;
20+
21+
# location /flower/ {
22+
# return 200 'Test';
23+
# add_header Content-Type text/plain;
24+
# }
25+
26+
# location /flower/test {
27+
# return 200 'Testing';
28+
# add_header Content-Type text/plain;
29+
# }
30+
# }
31+
32+
33+
user nginx;
34+
worker_processes 1;
35+
36+
events {
37+
worker_connections 1024;
38+
}
39+
40+
http {
41+
include /etc/nginx/mime.types;
42+
client_max_body_size 100m;
43+
44+
server {
1845
listen 80;
1946
charset utf-8;
2047

48+
# flower
2149
location /flower/ {
22-
return 200 'Test';
23-
add_header Content-Type text/plain;
24-
}
25-
26-
location /flower/test {
27-
return 200 'Testing';
28-
add_header Content-Type text/plain;
50+
rewrite ^/flower/(.*)$ /$1 break;
51+
proxy_pass http://localhost:5555;
52+
proxy_set_header Host $host;
53+
proxy_redirect off;
54+
proxy_http_version 1.1;
55+
proxy_set_header Upgrade $http_upgrade;
56+
proxy_set_header Connection "upgrade";
2957
}
58+
}
3059
}

0 commit comments

Comments
 (0)