Home  >  Q&A  >  body text

python - flask blog add domain name

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.

给我你的怀抱给我你的怀抱2712 days ago681

reply all(3)I'll reply

  • 習慣沉默

    習慣沉默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;
         }
    }

    reply
    0
  • PHPz

    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.

    reply
    0
  • PHPz

    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

    reply
    0
  • Cancelreply