Skip to content

Commit

Permalink
OZ-457: Follow-up commit to fix issue with Nginx crashing when SENAIT…
Browse files Browse the repository at this point in the history
…E server is not available (#72)
  • Loading branch information
Ruhanga authored Jan 26, 2024
1 parent 0b9890e commit 6bfc2bf
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions proxy/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,23 @@ server {
server {
listen 8081;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /VirtualHostBase/https/$host/senaite/VirtualHostRoot/$1 break;
proxy_pass http://senaite:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
set $senaite senaite:8080;
proxy_pass http://$senaite;
rewrite ^(.*)$ /VirtualHostBase/https/$host/senaite/VirtualHostRoot/$1 break;
}
}

server {
listen 8081;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /VirtualHostBase/http/$host/senaite/VirtualHostRoot/$1 break;
proxy_pass http://senaite:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
set $senaite senaite:8080;
proxy_pass http://$senaite;
rewrite ^(.*)$ /VirtualHostBase/http/$host/senaite/VirtualHostRoot/$1 break;
}
}

0 comments on commit 6bfc2bf

Please sign in to comment.