nginx匹配所有请求路径显示index.html页面
server { listen 80; server_name example.com; # 替换为你的域名 root /path/to/your/root; # 替换为你的站点目录 location / { try_files $uri $uri/ /index.html; } }
server { listen 80; server_name example.com; # 替换为你的域名 root /path/to/your/root; # 替换为你的站点目录 location / { try_files $uri $uri/ /index.html; } }