Logo

GitLab

Sign in

朱子纯 / onto-demo

  • Back to Dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Snippets
  • onto-demo
  • deploy
  • nginx.conf
  • init
    dddde8da
    zichun authored
    2026-07-22 18:54:09 +0800  
    Browse Code »
nginx.conf 406 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
server {
    listen 80;
    server_name _;

    root /usr/share/nginx/html;
    index index.html;

    # SPA 路由回退
    location / {
        try_files $uri $uri/ /index.html;
    }

    # 反代到后端引擎,前端无需硬编码后端地址
    location /api/ {
        proxy_pass http://engine:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}