mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 17:00:36 -05:00
41 lines
910 B
Text
41 lines
910 B
Text
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name _;
|
|
|
|
# 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;
|
|
}
|
|
|
|
location /media {
|
|
alias /srv/uxbox/media;
|
|
}
|
|
|
|
location /static {
|
|
alias /srv/uxbox/static;
|
|
}
|
|
|
|
# Backend
|
|
location /api/ {
|
|
proxy_pass http://uxbackend:6060/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|