How CREWS maps long clip URLs on crews.championship.technology to short URLs on www.championship.technology without changing the address bar, plus the nginx directives to paste once in Plesk.
Goal: share
https://www.championship.technology/2026-WORLDS-PRELIMS.rar
while the file still lives at
https://crews.championship.technology/clips/2026/WORLDS/PRELIMS.rar.
Recipients must keep the short URL in the bar (proxy), not a 302 that reveals the long path.
/clips/{YEAR}/{NAME}/{file.rar}
→
{YEAR}-{NAME}-{file.rar}.
Example:
CRW-X.rar →
2026-WORLDS-CRW-X.rar.
Region folder names have no hyphens (WORLDS, USA);
filenames may contain hyphens.
rar_support.py builds/reverses the slug;
server.py serves
GET /YEAR-NAME-file.rar
from
clips/YEAR/NAME/file.rar
(byte-range capable). Env:
CREWS_SHORTLINK_ORIGIN
(default
https://www.championship.technology).
championship.technology / www, one regex
location
proxies matching *.rar shortlinks to
127.0.0.1:8765
(same CREWS process as the subdomain).
| Layer | Role |
|---|---|
| Slug math | rar_support.shortlink_slug_from_clips_public_path / reverse |
| Serve short path | server._try_serve_clip_shortlink |
| Copy button | Extract → Clips RAR packages (chain icon) |
| Apex proxy | deploy/nginx-championship.technology-shortlinks.conf |
| Optional /crews UI | deploy/nginx-championship.technology-crews.conf |
Plesk strips {4} from \d{4} in Additional nginx directives.
Always write four digit classes: [0-9][0-9][0-9][0-9].
Plesk → championship.technology → Apache & nginx Settings →
Additional nginx directives.
Requires CREWS on 127.0.0.1:8765.
# /YEAR-NAME-file.rar → CREWS (address bar stays short)
# Plesk-safe: no {N} quantifiers
location ~ ^/([0-9][0-9][0-9][0-9])-[^/]+-.+\.rar$ {
proxy_pass http://127.0.0.1:8765;
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;
proxy_buffering off;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 0;
}
Canonical file:
deploy/nginx-championship.technology-shortlinks.conf
Keeps
https://www.championship.technology/crews/…
in the bar while proxying to CREWS. Do not set
CREWS_PUBLIC_BASE=/crews — the UI auto-detects
/crews from the browser path.
location = /crews {
return 301 /crews/;
}
location /crews/ {
proxy_pass http://127.0.0.1:8765/;
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;
proxy_buffering off;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 0;
}
Canonical file:
deploy/nginx-championship.technology-crews.conf
You can map any path on
crews.championship.technology
to a short path on
www.championship.technology
using only apex nginx (no CREWS slug code).
Prefer proxy when the short URL must stay in the address bar;
use redirect only when revealing the long URL is acceptable.
Map
www.championship.technology/SHORTLINK
→
crews.championship.technology/xxx/yyy/zzz
(same machine, CREWS on 8765):
# Example: /PRELIMS.rar → /clips/2026/WORLDS/PRELIMS.rar on CREWS
location = /PRELIMS.rar {
proxy_pass http://127.0.0.1:8765/clips/2026/WORLDS/PRELIMS.rar;
proxy_http_version 1.1;
proxy_set_header Host crews.championship.technology;
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;
proxy_buffering off;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 0;
}
Arbitrary path example
(/xxx/yyy/zzz → short /SHORTLINK):
location = /SHORTLINK {
proxy_pass http://127.0.0.1:8765/xxx/yyy/zzz;
proxy_http_version 1.1;
proxy_set_header Host crews.championship.technology;
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;
proxy_buffering off;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 0;
}
location = /SHORTLINK {
return 302 https://crews.championship.technology/xxx/yyy/zzz;
}
Better than dozens of location = blocks when the set grows.
Put the map in a file included from the http context
(or Plesk custom template) — Additional directives alone may not allow
top-level map depending on Plesk version.
# http { … } context (not always available in Plesk Additional directives)
map $uri $crews_short_target {
default "";
/PRELIMS.rar /clips/2026/WORLDS/PRELIMS.rar;
/SHORTLINK /xxx/yyy/zzz;
/docs-stuck /docs/extract-stuck-at-100.html;
}
# server / Additional directives:
location / {
if ($crews_short_target = "") { return 404; }
proxy_pass http://127.0.0.1:8765$crews_short_target;
proxy_http_version 1.1;
proxy_set_header Host crews.championship.technology;
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;
proxy_buffering off;
client_max_body_size 0;
}
A bare location / that proxies everything will break the main www site.
Scope shortlinks to exact paths, a prefix (e.g. /go/), or a regex
that only matches your shortlink shape.
Keep marketing pages on /; put shareable shorts under
/s/:
# www.championship.technology/s/PRELIMS.rar
# → crews …/clips/2026/WORLDS/PRELIMS.rar
location = /s/PRELIMS.rar {
proxy_pass http://127.0.0.1:8765/clips/2026/WORLDS/PRELIMS.rar;
proxy_http_version 1.1;
proxy_set_header Host crews.championship.technology;
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;
proxy_buffering off;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 0;
}
http://127.0.0.1:8765/… (same OVH box).Host to the crews vhost if the app or nginx on 8765 cares about Host.client_max_body_size 0.{N} in regex quantifiers in Additional directives.clips/YEAR/NAME/.https://www.championship.technology/YEAR-NAME-file.rar.
Root-level or extra-folder packages (not under
clips/YEAR/NAME/) cannot use this deterministic pattern;
use a general nginx-only mapping (section above) if needed.