更新时间:2023-11-29 19:55:04
Apparently alias and try_files don't work together. However, I don't think you need to use alias.
location /mr {
default_type "text/html";
try_files /fullpath/$uri /fullpath/$uri.html /fullpath/$uri/index.html /fullpath/index.html;
}
Which would try:
I think the root directive does work with try files but am unable to test.
server{
location /mr {
root /home/mysite/fullpath;
default_type "text/html";
try_files $uri $uri.html $uri/index.html index.html;
}
}