I wrote a flask blog myself and deployed it on VPS using gunicorn nginx. Normally logging in with IP can display normally.
I have purchased a domain name adoubi.life and DNSpod domain name on GOdaddy.
Because I don’t understand this content very well, all the searches on the Internet are about flask url domain names.
I hope that familiar friends can provide some help, thank you all.
習慣沉默2017-05-18 10:48:44
You can search for "How to bind domain name to IP" and you will get relevant answers. This has some relationship with flask
关系不大,和nginx
, for example, this is part of my settings
server {
listen 80;
# 域名这样子配置
server_name rookiefly.cn;
location / {
try_files $uri @gunicorn_proxy;
}
location @gunicorn_proxy{
proxy_set_header X_Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://127.0.0.1:4359;
}
}
PHPz2017-05-18 10:48:44
I figured it out myself. When adding domain name resolution to DNSpod, just fill in your VPS IP clearly.
PHPz2017-05-18 10:48:44
The domain name is bound to nginx,
It has nothing to do with flask
nginx is equivalent to a reverse proxy