Nginx部署create-react-app项目

12-18
评论
字数统计:233(字)
使用Nginx部署create-react-app项目,路由使用react-router browserHistory模式。

vim /etc/nginx/sites-enabled

server {
    listen 80;
    
    server_name domain.com www.domain.com;
    
    location /  {
        root /root/project/build;
        try_files $uri $uri/ /index.html;
    }
}

本文链接:https://blog.crazylei.com/art/a9d04454
版权声明: 本博客所有文章除特别声明外,均采用CC BY 4.0 CN协议 许可协议。转载请注明出处!

评论

正在加载评论...

友情链接:互链8收录网
©2022 Crazylei Bolg沪ICP备20001821号