In this hands-on lab, you are tasked with establishing local resolution for a domain name, to permit localized application testing.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Verify the contents and order of /etc/nsswitch.conf.
You’ll want to verify that
files
comes beforehosts
, in thehosts
section of/etc/nsswitch.conf
.- Modify /etc/hosts to include www.example.com.
You will need to modify
/etc/hosts
to resolvewww.example.com
to your local IP. Use your local IP:10.0.1.10
.- Verify that you can now connect to the locally running webserver at www.example.com.
You should get the same output if you
curl
eitherlocalhost
orwww.example.com
.curl localhost
curl www.example.com