💚 Fix backend entrypoint

This commit is contained in:
mathieu.brunot 2019-02-16 16:50:39 +01:00
parent 4b9195e8e5
commit c8d645f920
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
2 changed files with 9 additions and 8 deletions

View file

@ -1,8 +1,8 @@
# This will load balance your backend to one or more destinations.
upstream backend {
# server api1.my.uxbox.com:3000;
# server api1.my.uxbox.com:3001;
# server api2.my.uxbox.com:3000;
# server api1.uxbox.{{ DOMAIN }}:3000;
# server api1.uxbox.{{ DOMAIN }}:3001;
# server api2.uxbox.{{ DOMAIN }}:3000;
server uxbackend:6060; # This is a circular reference that allows docker to start as the example project, it is not recommended to use this in actual development.
}
@ -23,6 +23,8 @@ server {
#ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
#ssl_prefer_server_ciphers on;
#server_name uxbox.{{ DOMAIN }};
# Reverse Proxy to Backend (Avoids XSS concerns) --Update api to be whatever your site uses to access your backend
location /api/ {
#proxy_pass http://backend;
@ -35,8 +37,8 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# IMPORTANT: Update my.uxbox.com to your production site. This will allow cookies to work as expected when using your deployment locally
#proxy_cookie_domain localhost my.uxbox.com;
# IMPORTANT: Update uxbox.{{ DOMAIN }} to your production site. This will allow cookies to work as expected when using your deployment locally
#proxy_cookie_domain localhost uxbox.{{ DOMAIN }};
}
# Application