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
Edit the file /etc/hosts, add the following line:
/etc/hosts
127.0.0.1 example.com blog.example.com
Then try http://example.com:8000/ and http://blog.example.com:8000/