update for pc server

This commit is contained in:
2025-11-24 20:39:18 +01:00
parent 4df7501aba
commit bd1d56e1d0
6 changed files with 96 additions and 101 deletions

View File

@@ -0,0 +1,54 @@
server {
listen 80;
server_name asf-testarena.duckdns.org;
# Frontend Static Files
location / {
root /var/www/testarena;
index index.html;
try_files $uri $uri/ /index.html;
}
# Backend API Proxy
location /api/ {
proxy_pass http://localhost:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /auth/ {
proxy_pass http://localhost:8000/auth/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /admin/ {
proxy_pass http://localhost:8000/admin/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /jobs/ {
proxy_pass http://localhost:8000/jobs/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# WebSocket Proxy
location /ws/ {
proxy_pass http://localhost:8000/ws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
# Results (Assuming you mount/copy results to this path or proxy to backend if it served them)
# The backend was configured to write to /results.
# Since we are running backend in docker, we mapped ./results to /results.
# You can alias this location to the local folder on your PC.
location /results/ {
alias /path/to/your/project/testarena/results/;
autoindex on;
}
}