How to test sub-domains on my localhost on a mac?

前端 未结 2 760
清歌不尽
清歌不尽 2021-01-17 16:15

I have set up a web application on I am running it on my localhost. That is - http://127.0.0.1:8000/. I have set up sub-domains as well. For example, going to http://blog.12

2条回答
  •  [愿得一人]
    2021-01-17 16:49

    Edit the file /etc/hosts, add the following line:

    127.0.0.1 example.com blog.example.com
    

    Then try http://example.com:8000/ and http://blog.example.com:8000/

提交回复
热议问题