这个问题找了好半天没结果
原文:
You can just use rewrite function without location
rewrite ^/$ /index.html last;
or for permanent redirect
rewrite ^/$ /index.html permanent;
使用示例:
复制代码
1
2
3
4
5
6
7
8
9#所有地址的转发 location ^~/ { proxy_pass http://abc.abcccccc.com/; rewrite ^/$ /index.html last; index index.html; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
转载自:http://finddoc.top/article?id=b14eb1ed2b2842a78e8e1fe1f664d175
最后
以上就是英勇水杯最近收集整理的关于nginx配置域名根目录转发到index.html的全部内容,更多相关nginx配置域名根目录转发到index内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复