httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chau Pham <chaup...@hotmail.com>
Subject RE: [users@httpd] Android device ID not show on access_log
Date Fri, 07 Dec 2012 08:52:45 GMT
Hi Everybody, Do you have Idea about it? or follow this topic, please answer! Thank You,From:
chaupv79@hotmail.com
To: users@httpd.apache.org
Date: Fri, 7 Dec 2012 07:28:05 +0000
Subject: RE: [users@httpd] Android device ID not show on access_log




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) device
however 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:
rbowen@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
rbowen@rcbowen.com :: @rbowen
rbowen@apache.org








 		 	   		   		 	   		  
Mime
View raw message