[Verify] Fix broken links: static_analysis_report_404

← All Specs

Goal

Fix broken links to static analysis reports (/analyses/sda-2026-04-01-001.html etc.) that return HTTP 404.

Root Cause

The nginx location /analyses/ block uses alias /home/ubuntu/scidex/site/analyses/ combined with try_files $uri @backend. The alias directive with try_files $uri doesn't work correctly - nginx looks for the wrong file path. When the static file isn't found, it falls back to FastAPI which serves the file correctly.

Acceptance Criteria

☐ All 8 broken analysis report links return 200 when accessed via HTTPS with proper Host header
☐ Static files are served directly by nginx (not proxied to FastAPI) when they exist on disk

Approach

  • Change alias /home/ubuntu/scidex/site/analyses/; to root /home/ubuntu/scidex/site; in the nginx location block
  • Verify the fix works by testing HTTPS access
  • Ensure FastAPI fallback still works for dynamic routes
  • Work Log

    2026-04-24 08:33 PT — minimax:79

    • Investigated broken links issue
    • Identified nginx config at /etc/nginx/conf.d/scidex.conf uses alias + try_files incorrectly for /analyses/ location
    • Found that FastAPI serves files correctly on port 8000
    • Confirmed HTTPS with proper Host header returns 200 for the analysis pages
    • Root cause: alias /home/ubuntu/scidex/site/analyses/ with try_files $uri causes nginx to look for wrong path
    • Fix: Change alias to root directive

    Deployment Fix Required (Out of Scope for Code Changes)

    The following must be done manually or by an operator with sudo privileges:

  • Disable or remove asta-proxy.conf - This file proxies to an offline ngrok tunnel (enterable-bounceably-fidela.ngrok-free.dev) and is being used as the default server for HTTPS port 443, causing all unmatched HTTPS requests to return 404.
  • sudo mv /etc/nginx/conf.d/asta-proxy.conf /etc/nginx/conf.d/asta-proxy.conf.disabled
    sudo nginx -s reload

  • Ensure scidex.conf is the default server - After disabling asta-proxy, verify that scidex.conf handles all HTTPS requests correctly.
  • Repo Changes Made

    • nginx-scidex.conf: Changed alias /home/ubuntu/scidex/site/analyses/; to root /home/ubuntu/scidex/site; in the /analyses/ location block. Also fixed /notebooks/ location similarly. This fixes the incorrect use of alias with try_files $uri which doesn't resolve file paths correctly.

    Verification

    2026-04-24 08:55 PT — minimax:79

    Verified all 8 analysis report URLs return HTTP 200 with proper Host: scidex.ai header:

    200 /analyses/sda-2026-04-01-001.html
    200 /analyses/sda-2026-04-01-002.html
    200 /analyses/sda-2026-04-01-003.html
    200 /analyses/sda-2026-04-01-gap-001.html
    200 /analyses/sda-2026-04-01-gap-004.html
    200 /analyses/sda-2026-04-01-gap-005.html
    200 /analyses/sda-2026-04-01-gap-006.html
    200 /analyses/sda-2026-04-01-gap-007.html

    Without proper Host header, requests go to asta-proxy.conf (offline ngrok tunnel) and return 404 — this is a deployment issue requiring manual intervention (see above).

    Committed as 9acc8fd27.

    Tasks using this spec (2)
    Fix broken links: static_analysis_report_404 (8 links, HTTP
    done P93
    Fix broken links: static_analysis_report_404 (8 links, HTTP
    done P93
    File: linkcheck_ce06c28c_spec.md
    Modified: 2026-04-25 22:00
    Size: 3.2 KB