Hands-on task
This task is step 10 of the course “Networking and HTTP from the terminal”
curl --resolve: bypass DNS
A local server on port 8080 serves a page only when it is addressed by the name shop.local. Reach it as http://shop.local:8080/, without touching /etc/hosts: force shop.local to resolve to 127.0.0.1 using curl's own means. Save the response body to /root/body.txt.
What you'll practise:
- curl
- --resolve
- dns
- virtual host
- host header