nginx中配置react-router参数跳转
生活随笔
收集整理的這篇文章主要介紹了
nginx中配置react-router参数跳转
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
location / {root /home/iwork;index index.html;try_files $uri /index.html; #這句關鍵哦 }#子路徑刷新 location ^~ /main {try_files $uri /index.html; }#代理 location ^~ /iwork/ {proxy_pass http://192.168.0.193:8080/iwork/;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }nginx 只匹配 / ,剩下的應該由react-router來做
轉載于:https://my.oschina.net/xuqiang/blog/690705
總結
以上是生活随笔為你收集整理的nginx中配置react-router参数跳转的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: static在类中的定义,和enum的用
- 下一篇: PowerShell 收集计算机相关信