python - flask blog add domain name
给我你的怀抱
给我你的怀抱 2017-05-18 10:46:44
0
3
702

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.

给我你的怀抱
给我你的怀抱

reply all(3)
習慣沉默

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;
     }
}
PHPzhong

I figured it out myself. When adding domain name resolution to DNSpod, just fill in your VPS IP clearly.

PHPzhong

The domain name is bound to nginx,
It has nothing to do with flask
nginx is equivalent to a reverse proxy

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!