Files move to <NEXTCLOUD_DIR>/<domain>/<type>.zip; packs.json is {domain: {type: meta}}.
Only resourcepack shows the server.properties snippet; datapack/modpack show the URL.
modpack skips the pack.mcmeta check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79 lines
2.7 KiB
Nginx Configuration File
79 lines
2.7 KiB
Nginx Configuration File
events {}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
|
|
upstream mc_api { server api:8000; }
|
|
upstream mc_frontend { server frontend:80; }
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
client_max_body_size 1m;
|
|
|
|
location /api/ {
|
|
proxy_pass http://mc_api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# 팩 업로드: 크기 제한 없음 (Nextcloud 로 넘어가므로)
|
|
# 정규식으로 둔다: prefix "/api/packs/" 면 nginx 가 GET /api/packs 를 301 로 돌려버린다
|
|
location ~ ^/api/packs/ {
|
|
client_max_body_size 0;
|
|
proxy_request_buffering off;
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
proxy_pass http://mc_api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location = /health {
|
|
proxy_pass http://mc_api;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://mc_frontend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
|
|
# 팩 공개 다운로드 전용 (외부 mc.tkrmagid.kr/pack/ 이 이 포트로 연결됨).
|
|
# 대시보드/API 와 포트를 분리해서, 외부에서는 /pack/ 말고는 아무것도 닿지 않게 한다.
|
|
server {
|
|
listen 81;
|
|
server_name _;
|
|
|
|
location /pack/ {
|
|
limit_except GET HEAD { deny all; }
|
|
proxy_buffering off;
|
|
proxy_read_timeout 600s;
|
|
proxy_pass http://mc_api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
location / {
|
|
return 404;
|
|
}
|
|
}
|
|
}
|