访问 http
root@aliyun:~# wget http://www.zhihu.com
–2020-08-28 08:36:22-- http://www.zhihu.com/
Resolving www.zhihu.com (www.zhihu.com)... 42.81.92.60, 42.81.85.241
(1) dns 解析
Connecting to www.zhihu.com (www.zhihu.com)``|42.81.92.60|:80
… connected.(2) 建立连接
HTTP request sent, awaiting response…(3) 发起 HTTP 请求
302 Found(4) 发起 HTTP 状态码 302 重定向
Location: https://www.zhihu.com/ [following]
–2020-08-28 08:36:22-- https://www.zhihu.com/
Connecting to www.zhihu.com (www.zhihu.com)|42.81.92.60|:443
… connected.
HTTP request sent, awaiting response… 302 Found
Location: //www.zhihu.com/signin?next=%2F [following]
–2020-08-28 08:36:22-- https://www.zhihu.com/signin?next=%2F
Reusing
existing connection to www.zhihu.com:443.
HTTP request sent, awaiting response… 200 OK
Length: 50811 (50K) [text/html]
Saving to: ‘index.html’
index.html 100%[=================================>] 49.62K --.-KB/s in 0.007s
2020-08-28 08:36:22 (6.61 MB/s) - ‘index.html’ saved [50811/50811]
访问 https
root@aliyun:~# wget https://www.zhihu.com
–2020-08-31 16:41:14-- https://www.zhihu.com/
Resolving www.zhihu.com (www.zhihu.com)
… 42.81.85.241, 42.81.92.60
Connecting to www.zhihu.com (www.zhihu.com)|42.81.85.241|:443
… connected.
HTTP request sent, awaiting response… 302 Found
Location: //www.zhihu.com/signin?next=%2F [following]
–2020-08-31 16:41:14-- https://www.zhihu.com/signin?next=%2F
Reusing existing connection to www.zhihu.com:443.
HTTP request sent, awaiting response… 200 OK
Length: 51048 (50K) [text/html]
Saving to: ‘index.html’
index.html 100%[=======================>] 49.85K --.-KB/s in 0.006s
2020-08-31 16:41:14 (7.71 MB/s) - ‘index.html’ saved [51048/51048]
总结
第一步进行域名解析
,拿到 IP
地址。