Ciscoman's notes (Записки цыщика c дипломом)

I'm Cisco Champion Community member for 2017!

I'm Cisco Champion Community member for 2017!
"Cisco Champions are passionate about Cisco and happy to share our knowledge, experience, and feedback."

среда, 7 сентября 2016 г.

Quick note: How to check http server reachability if you can't resolve DNS name

Note: How to check http server reachability if you can't resolve DNS name:

Variant number one:

$ telnet 127.0.0.1 80
GET / HTTP/1.1
host: www.example.com
 
Variant number two with curl:
 
$ curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/ 
 
Better varian for older curl:
 
curl -k --verbose --header 'Host: www.example.com' 'https://127.0.0.1:443/' 
 
Even shorter:
 
curl -kvH 'Host: www.example.com' 'https://127.0.0.1:443/'  

Комментариев нет:

Отправить комментарий

Постоянные читатели

Поиск по этому блогу