Samuel Shuert | 4548998 | 2023-11-29 15:29:36 -0500 | [diff] [blame^] | 1 | server { |
| 2 | listen 80 default_server; |
| 3 | |
| 4 | client_max_body_size 100M; |
| 5 | charset utf-8; |
| 6 | |
| 7 | # Frontend |
| 8 | location / { |
| 9 | proxy_pass http://taiga-front/; |
| 10 | proxy_pass_header Server; |
| 11 | proxy_set_header Host $http_host; |
| 12 | proxy_redirect off; |
| 13 | proxy_set_header X-Real-IP $remote_addr; |
| 14 | proxy_set_header X-Scheme $scheme; |
| 15 | } |
| 16 | |
| 17 | # API |
| 18 | location /api/ { |
| 19 | proxy_pass http://taiga-back:8000/api/; |
| 20 | proxy_pass_header Server; |
| 21 | proxy_set_header Host $http_host; |
| 22 | proxy_redirect off; |
| 23 | proxy_set_header X-Real-IP $remote_addr; |
| 24 | proxy_set_header X-Scheme $scheme; |
| 25 | } |
| 26 | |
| 27 | # Admin |
| 28 | location /admin/ { |
| 29 | proxy_pass http://taiga-back:8000/admin/; |
| 30 | proxy_pass_header Server; |
| 31 | proxy_set_header Host $http_host; |
| 32 | proxy_redirect off; |
| 33 | proxy_set_header X-Real-IP $remote_addr; |
| 34 | proxy_set_header X-Scheme $scheme; |
| 35 | } |
| 36 | |
| 37 | # Static |
| 38 | location /static/ { |
| 39 | alias /taiga/static/; |
| 40 | } |
| 41 | |
| 42 | # Media |
| 43 | location /_protected/ { |
| 44 | internal; |
| 45 | alias /taiga/media/; |
| 46 | add_header Content-disposition "attachment"; |
| 47 | } |
| 48 | |
| 49 | # Unprotected section |
| 50 | location /media/exports/ { |
| 51 | alias /taiga/media/exports/; |
| 52 | add_header Content-disposition "attachment"; |
| 53 | } |
| 54 | |
| 55 | location /media/ { |
| 56 | proxy_set_header Host $http_host; |
| 57 | proxy_set_header X-Real-IP $remote_addr; |
| 58 | proxy_set_header X-Scheme $scheme; |
| 59 | proxy_set_header X-Forwarded-Proto $scheme; |
| 60 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 61 | proxy_pass http://taiga-protected:8003/; |
| 62 | proxy_redirect off; |
| 63 | } |
| 64 | |
| 65 | # Events |
| 66 | location /events { |
| 67 | proxy_pass http://taiga-events:8888/events; |
| 68 | proxy_http_version 1.1; |
| 69 | proxy_set_header Upgrade $http_upgrade; |
| 70 | proxy_set_header Connection "upgrade"; |
| 71 | proxy_connect_timeout 7d; |
| 72 | proxy_send_timeout 7d; |
| 73 | proxy_read_timeout 7d; |
| 74 | } |
| 75 | } |