diff --git a/nginx.conf b/nginx.conf index 93bb937..cc50542 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,13 +4,22 @@ server { root /usr/share/nginx/html; index index.html; + # 共享静态资源 + location /css/ { + alias /usr/share/nginx/html/css/; + } + + location /img/ { + alias /usr/share/nginx/html/img/; + } + # 主简历 location /resume/ { alias /usr/share/nginx/html/resume/; try_files $uri $uri/ /resume/index.html; } - # 其他简历导航 + # 其他简历导航页 location /other/ { alias /usr/share/nginx/html/other/; try_files $uri $uri/ /other/index.html; @@ -28,7 +37,7 @@ server { try_files $uri $uri/ /other/security-engineer/index.html; } - # 默认路由(重定向到主简历) + # 根路径重定向到主简历 location / { return 301 /resume/; }