diff options
Diffstat (limited to 'template/nginx/root.conf.template')
-rw-r--r-- | template/nginx/root.conf.template | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index 8214bf7..110def4 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -1,9 +1,24 @@ +upstream crupest-api { + server crupest-api:5000 +} + server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name ${CRUPEST_DOMAIN}; root /srv/www; + + location /api { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_pass http://crupest-api; + } } server { |