Deploy your own flask application on AWS. The AWS system is Ubuntu 14.04
The deployment plan is uwsgi+nginx
But after deployment, you can only use AWS’s public DNS (ec2-xx-xxx-xxx-xxx.ap-northeast-
1.compute.amazonaws.com:8000) For access, domain names cannot be used for access.
When using a domain name to access, the browser prompts Gateway Timeout
uwsgi uses the command line to start,
nginx.conf file is as follows:
server{
listen 8000;
server_name www.xxx.com;
location /{
include uwsgi_params;
params_pass http://127.0.0.1:8000;
}
location /sttic{
alias /home/xxx/weblog/app/static;
}
}
www.xxx.com is the domain name that has been purchased, and the resolution of AWS public IP has been set up.
How do I change the settings so that I can use the domain name for access? ?
I use nginx to bind the domain name. Then nginx listens on the port and then uses gunicorn to start the flask application and go to the corresponding port to implement the domain name binding www.anaf.cn