|
[root@gary-tao src]# cd /data/wwwroot/test.com [root@gary-tao test.com]# ls
admin index.html
[root@gary-tao test.com]# vim 1.gif
[root@gary-tao test.com]# echo "dgagadgadgs" > /data/wwwroot/test.com/2.js
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/1.gif
dggagadggagdag
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/2.js
dgagadgadgs
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/index.html
“test.com”
[root@gary-tao test.com]# cat /tmp/test.com.log
127.0.0.1 - [04/Jan/2018:18:53:20 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/index.html
“test.com”
[root@gary-tao test.com]# cat /tmp/test.com.log
127.0.0.1 - [04/Jan/2018:18:53:20 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
127.0.0.1 - [04/Jan/2018:18:53:53 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/2.js
dgagadgadgs
[root@gary-tao test.com]# cat /tmp/test.com.log
127.0.0.1 - [04/Jan/2018:18:53:20 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
127.0.0.1 - [04/Jan/2018:18:53:53 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
[root@gary-tao test.com]# curl -x127.0.0.1:80 test.com/2.jsagdaga
404 Not Found
404 Not Found
nginx/1.12.1
[root@gary-tao test.com]# cat /tmp/test.com.log
127.0.0.1 - [04/Jan/2018:18:53:20 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
127.0.0.1 - [04/Jan/2018:18:53:53 +0800] test.com "/index.html" 200 "-" "curl/7.29.0"
127.0.0.1 - [04/Jan/2018:18:55:22 +0800] test.com "/2.jsagdaga" 404 "-" "curl/7.29.0"
[root@gary-tao test.com]# curl -x127.0.0.1:80 -I test.com/2.js
HTTP/1.1 200 OK
Server: nginx/1.12.1
Date: Thu, 04 Jan 2018 10:56:11 GMT
Content-Type: application/javascript
Content-Length: 12
Last-Modified: Thu, 04 Jan 2018 10:51:59 GMT
Connection: keep-alive
ETag: "5a4e074f-c"
Expires: Thu, 04 Jan 2018 22:56:11 GMT
Cache-Control: max-age=43200 //43200秒表示过期时间12小时,与配置文件里一样。
Accept-Ranges: bytes
|
|
|
|
|
|
|