问题
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