112.95.211.154 - - [08/Mar/2018:15:22:21 +0800] "GET /phihome/qr/?m=phicomm&c=echo&p=r1&s=BZHCA HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36" "-"
查80端口对应的进程
netstat -lntp|grep 80
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 18107/nginx
ps -ef|grep 18107
ps -ef|grep nginx
root 18152 1 0 2017 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
112.95.211.154 - - [08/Mar/2018:15:22:21 +0800] "GET /phihome/qr/?m=phicomm&c=echo&p=r1&s=BZHCA HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36" "-"
发现请求返回的是404
location /phihome/qr {
proxy_pass http://proxy_phihome_app_download;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect http:// $scheme://;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
upstream proxy_phihome_app_download{
server 192.168.71.20:5007;
}
[root@web02test ~]# netstat -lntp|grep 5007
tcp 0 0 0.0.0.0:5007 0.0.0.0:* LISTEN 1995/nginx
[root@web02test ~]# ps -ef|grep 1995
root 1995 1 0 2017 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
重复上述步骤 找到access.log位置进行观察
192.168.71.15 - - [08/Mar/2018:16:12:58 +0800] "GET /phihome/qr/?m=phicomm&c=echo&p=r1&s=BZHCA HTTP/1.0" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36" "112.95.211.154"
server {
listen 5007;
server_name localhost;
location / {
root /data/deploy/static/com.phicomm.smarthome.phihome/phihome-download-web/HEAD/;
}
location = /50x.html {
root /data/thinkphp/Public;
}
}
[root@web02test conf.d]# cd /data/deploy/static/com.phicomm.smarthome.phihome/phihome-download-web/HEAD
-bash: cd: /data/deploy/static/com.phicomm.smarthome.phihome/phihome-download-web/HEAD: No such file or directory
没有找到!进入到父级目录看看
[root@web02test ~]# cd /data/deploy/static/com.phicomm.smarthome.phihome/phihome-download-web
[root@web02test phihome-download-web]# ll
total 8
lrwxrwxrwx 1 root root 77 Mar 8 15:43 HAED -> /root/deploy/static/com.phicomm.smarthome.phihome/phihome-download-web/www/12
drwxr-xr-x 12 root root 4096 Mar 7 19:53 www
112.95.211.154 - - [08/Mar/2018:16:03:35 +0800] "GET /phihome/qr/static/images/echo.png HTTP/1.1" 200 625298 "https://sitresourcehome.phicomm.com/phihome/qr/static/css/index.css?version=1.0" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36" "-"