Thank you so much, both of you who answered me,I was wrong when not mentioned 
about the header. the header, it is "User-Agent" passed to apache 
server(version  2.2.15)in apache configuration, i used:  LogFormat "%h %l %u %t 
\"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" " combined The option 
"%{User-Agent}i" is to display header,  it works fine for computer, laptop, and 
apple(iphone, ipad) devicehowever when I use Android then access_log in service 
side prints out: 172.16.33.124 - - [07/Dec/2012:13:29:37 +0900] "GET 
/data/playgirls-14.ts HTTP/1.1" 200 2103156 "-" "stagefright/1.2 (Linux;Android 
4.0.4)"  - client side, the header is: Mozilla/5.0 (Linux; U; Android 4.0.4; 
ko-kr; SHW-M380W Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) 
Version/4.0 Safari/534.30
 -> both of them printed "Linux; U; Android 4.0.4", but access_log in server 
side not print Device ID: SHW-M380W apache access_log hadn't display full 
header. I had tried to set header "HTTP_USER_AGENT" but it didn't work.  Thank 
you,Chau Pham.   From: rbo...@rcbowen.com
Date: Thu, 6 Dec 2012 20:46:21 -0500
To: users@httpd.apache.org
Subject: Re: [users@httpd] Android device ID not show on access_log


On Dec 6, 2012, at 7:50 PM, Chau Pham wrote:No, it isn't a header, it's just 
general situation.
Client information is passed to apache httpd via headers. In this case, it 
would be in the HTTP_USER_AGENT header, which, when I access my server from my 
Android device, looks like
Mozilla/5.0 (Linux; Android 4.2.1; Nexus 7 ... and so on
So, yeah, you'd want to log the HTTP_USER_AGENT header.
See http://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats for 
details on how to configure your log file to log this value.

-- 
Rich Bowen
rbo...@rcbowen.com :: @rbowen
rbo...@apache.org








                                          

Reply via email to