File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,15 +14,6 @@ map $http_x_real_ip $forwarded_ip {
1414 default $remote_addr;
1515}
1616
17- upstream frontend {
18- # always assume the frontend will be available
19- server frontend max_fails=0;
20- }
21-
22- upstream backend {
23- server backend:8080 max_fails=0;
24- }
25-
2617server {
2718 listen [::]:80;
2819 listen 80;
@@ -93,6 +84,8 @@ server {
9384 # all redirects are relative to the gateway
9485 absolute_redirect off;
9586
87+ resolver 127.0.0.11 valid=30s ipv6=off;
88+
9689 location ~ /.well-known/acme-challenge {
9790 allow all;
9891 root /var/www/certbot;
@@ -103,17 +96,18 @@ server {
10396 }
10497
10598 location /openmrs/spa/ {
106- proxy_pass http://frontend/;
107- proxy_redirect http://$host/ /openmrs/spa/;
99+ set $frontend http://frontend;
100+ rewrite ^/openmrs/spa/(.*) /$1 break;
101+ proxy_pass $frontend;
108102 }
109103
110104 location /openmrs {
105+ set $backend http://backend:8080;
111106 proxy_read_timeout 300s;
112- proxy_pass http:// backend;
107+ proxy_pass $ backend;
113108 }
114109
115110 location /grafana {
116- resolver 127.0.0.11 valid=30s ipv6=off;
117111 set $grafana http://grafana:3000;
118112 proxy_read_timeout 300s;
119113 proxy_pass $grafana;
You can’t perform that action at this time.
0 commit comments