nginx 在 alias 與 tryfiles 合用時,會一直出現404錯誤。而根據 Stack Overflow 找到的資料表示,這是一個 bug。

This is a long standing bug in nginx. But you can work around by using the root directive again. Kind of a hack, but at least it works.

解決方法當然就是,將 alias 換成 root 並改相應參數就可以解決了

參考資料: NGINX try_files + alias directives https://trac.nginx.org/nginx/ticket/97