http://lincolnloop.com/blog/tracking-application-response-time-nginx/
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-reverse-proxy-for-apache

#vi /etc/nginx/sites-available/default
location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    proxy_pass http://192.168.1.168;
}

所有request網後端送

#vi /etc/nginx/nginx.conf
log_format timed_combined '$remote_addr [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';

access_log /var/log/nginx/access.log timed_combined;

#service nginx reload

192.168.1.154 [12/Nov/2014:13:29:25 +0800] "GET /A.jpg HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36" 0.002 0.002 .

arrow
arrow
    文章標籤
    Nginx Front End logformat
    全站熱搜

    slinbody 發表在 痞客邦 留言(0) 人氣()