Establish Local Resolution

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

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 before hosts, in the hosts section of /etc/nsswitch.conf.

Modify /etc/hosts to include

You will need to modify /etc/hosts to resolve to your local IP. Use your local IP:

Verify that you can now connect to the locally running webserver at

You should get the same output if you curl either localhost or

curl localhost


Additional Resources

Your organization's developers have asked you to configure the application server so that it responds to itself over the production domain, to facilitate some specific testing scenarios. You will need to configure the host to resolve this domain to its local private IP.

If you don't have experience with vim to edit text files, see:

You may also find this vim cheat sheet helpful:

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?