| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- server {
- server_name radionica3d.me 148.230.71.134;
- root /var/www/radionica3d/dist;
- index index.html;
- # Gzip Compression
- gzip on;
- gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
- location / {
- try_files $uri $uri/ /index.html;
- }
- # Proxy API requests to backend
- location /api/ {
- proxy_pass http://127.0.0.1:8000/;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- }
- # Standalone Deploy Webhook
- location /deploy-webhook {
- proxy_pass http://127.0.0.1:9000;
- proxy_set_header Host $host;
- }
- # WebSocket requests
- location /ws/ {
- proxy_pass http://127.0.0.1:8000/;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- proxy_set_header Host $host;
- }
- # Static uploads
- location /uploads/ {
- alias /var/www/radionica3d/backend/uploads/;
- expires 7d;
- add_header Cache-Control "public";
- }
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/radionica3d.me/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/radionica3d.me/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
- }
- server {
- if ($host = radionica3d.me) {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- listen 80;
- server_name radionica3d.me;
- return 301 https://radionica3d.me$request_uri;
- }
|