配置H:\nginx\nginx-1.25.3\conf\nginx.conf中server中的代码修改如下
server {
listen 80;
server_name localhost;
#charset koi8-r;
root html;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ @router;
index index.html index.htm;
}
location @router {
rewrite ^.*$ /index.html last;
}