mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 10:09:03 -05:00
🐛 Fix NGINX default config
This commit is contained in:
parent
1ef8789d21
commit
49a6bb11a8
1 changed files with 22 additions and 17 deletions
|
@ -1,9 +1,9 @@
|
|||
# This will load balance your backend to one or more destinations.
|
||||
upstream backend {
|
||||
upstream uxboxbackend {
|
||||
# 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.
|
||||
server uxbackend:6060; # This is a circular reference that allows docker to start as the example project
|
||||
}
|
||||
|
||||
server {
|
||||
|
@ -23,12 +23,28 @@ server {
|
|||
#ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
|
||||
#ssl_prefer_server_ciphers on;
|
||||
|
||||
#server_name uxbox.{{ DOMAIN }};
|
||||
#server_name uxbox.{{ DOMAIN }};
|
||||
server_name _;
|
||||
|
||||
# Reverse Proxy to Backend (Avoids XSS concerns) --Update api to be whatever your site uses to access your backend
|
||||
# Frontend
|
||||
location / {
|
||||
root /usr/share/nginx/html/;
|
||||
|
||||
try_files $uri /index.html;
|
||||
gzip on;
|
||||
gzip_types text/css text/javascript application/x-javascript application/javascript application/json;
|
||||
|
||||
add_header Cache-Control "max-age=15552000" always;
|
||||
}
|
||||
|
||||
location /view {
|
||||
alias /usr/share/nginx/html/view;
|
||||
}
|
||||
|
||||
# Backend
|
||||
location /api/ {
|
||||
#proxy_pass http://backend;
|
||||
proxy_pass http://uxbackend:6060;
|
||||
# Reverse Proxy to Backend (Avoids XSS concerns) --Update backend to be whatever your site uses to access your backend
|
||||
proxy_pass http://uxboxbackend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
@ -40,15 +56,4 @@ server {
|
|||
# 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
|
||||
location / {
|
||||
root /usr/share/nginx/html/;
|
||||
|
||||
try_files $uri /index.html;
|
||||
gzip on;
|
||||
gzip_types text/css text/javascript application/x-javascript application/javascript application/json;
|
||||
|
||||
add_header Cache-Control "max-age=15552000" always;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue