Twenty-eight: to achieve the main domains and subdomains of view of

 

First, be clear: the direct use localhost ip address and can not use the sub-domain

 

Primary Domain Name achieve

First, do a configuration, the local host mapping a domain name

 

SERVER_NAME option is specified in the config app for domain configuration: port number

Start flask program, visit

 

Subdomain achieve

By subdomain in the blueprint to specify subdomain

Mapping subdomain in local host file

access

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11800120.html