How to deploy react and django in aws with a ssl and a domain

假装没事ソ 提交于 2021-01-29 02:31:36

问题


Currently, I deployed react (port 80 & 443) and django (port 8000) in aws ec2 server. I bought a domain and standard ssl cert. It sets up in react (443).

In the server connection of react, it is using axios and connect to domain:8000 but I think it's not a good solution. Safari cannot connect to this kind of connection. Therefore, I add a subdomain: api.domain and change the connection from domain:8000 to api.domain. Since I don't have wildcard ssl cert, so https blocks my api.domain connection in the server.

What is the best practice of this case?


回答1:


Finally, fixed by using nginx to route the internal ports to external ports



来源:https://stackoverflow.com/questions/50544672/how-to-deploy-react-and-django-in-aws-with-a-ssl-and-a-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!