在NGINX的配置文件中添加以后代碼:
location / {
? ? ? ? root? /usr/share/nginx/html;
? ? ? ? try_files $uri $uri/ @router;
? ? ? ? index? index.html index.htm;
? ? }location @router {
? ? ? ? rewrite ^.*$ /index.html last;
? ? }
在NGINX的配置文件中添加以后代碼:
location / {
? ? ? ? root? /usr/share/nginx/html;
? ? ? ? try_files $uri $uri/ @router;
? ? ? ? index? index.html index.htm;
? ? }location @router {
? ? ? ? rewrite ^.*$ /index.html last;
? ? }