1
rrfeng 2023 年 1 月 16 日
nginx 不认识盘符。用相对路径吧。
|
2
sss15 2023 年 1 月 16 日
愚见,把 alias 换成 root 试试
|
3
hakr OP @rrfeng #1 应该不是盘符的问题, 改成下面这样后又出现了 500 Internal Server Error 错误
server { listen 9003; server_name _; root "D:/soft/phpstudy_pro/WWW/www.sc-one.com"; location /sc-admin { alias "D:/soft/phpstudy_pro/WWW/www.sc-one.com/sc-admin/"; try_files $uri $uri/ /sc-admin/index.html; index index.html; } } |
4
fly0512 2023 年 1 月 16 日
alias "D:/soft/phpstudy_pro/WWW/www.sc-one.com/sc-admin"
|
5
jifengg 2023 年 1 月 17 日
我的 windows nginx 配置路径也遇到过,用了 \\ 代替 / 是 ok 的。
另外,你 404 也要看看 nginx error log ,看看它访问资源的路径是啥 |