You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chau Pham <ch...@hotmail.com> on 2012/12/06 09:47:24 UTC

[users@httpd] Android device ID not show on access_log

Good Evening Everybody, I would like to ask you about apache access_log I use apple device to access to apache sever on centos, then I checked access_log in /var/log/httpd/access_logI can see any apple device ID. However, when I use some android device like samsung or smartphone that use android for operating system.I access to access_log , it doesn't show android device ID in spite of android has ID. how can I configure apache server to show Android device ID?  Look forward to hearing from you. Best Regards,Chau Pham.  		 	   		  

RE: [users@httpd] Android device ID not show on access_log

Posted by Chau Pham <ch...@hotmail.com>.
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








 		 	   		   		 	   		  

Re: [users@httpd] Android device ID not show on access_log

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Dec 7, 2012 at 7:28 AM, Chau Pham <ch...@hotmail.com> wrote:
> 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

No, it isn't. The first request is issued by libstagefright, which is
a component of ffmpeg, and the second request is issued by the stock
android browser. Each can send whatever user agent header it desires.

Therefore, requests made by libstagefright on android do not contain
the device ID field that you want. There is nothing that httpd can do
to change this.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Android device ID not show on access_log

Posted by Chau Pham <ch...@hotmail.com>.
Thank everyone who has answered, I prefer apple, Android has problem in this situation.
 > From: Bennett.Tony@con-way.com
> To: users@httpd.apache.org
> Date: Fri, 7 Dec 2012 07:46:52 -0800
> Subject: RE: [users@httpd] Android device ID not show on access_log
> 
> FYI:  On my DroidX, I have found that the User-Agent sent to apache is different based upon which browser on Android that you use:
> 
> Firefox produces:
>    "Mozilla/5.0 (Android; Mobile; rv:17.0) Gecko/17.0 Firefox/17.0"
> 
> The built-in browser produces:
> 
>     "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; DROIDX Build/4.5.1_57_DX8-51) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
> 
> 
> -----Original Message-----
> From: J.Lance Wilkinson [mailto:jlw12@psu.edu] 
> Sent: Friday, December 07, 2012 5:16 AM
> To: users@httpd.apache.org
> Cc: jlw12@psu.edu
> Subject: Re: [users@httpd] Android device ID not show on access_log
> 
> Chau Pham wrote:
> > 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
> 
> 	I use the same version of HTTPD.   MY log files, when I include that
> 	element in the LogFormat, present the entire string of the user agent
> 	(not a fragment in the middle like you're describing).   Are you
> 	examining the actual log files, or are you looking at something
> 	that has been run through a log file interpreter of some sort, since
> 	you're not only reporting not seeing the "device id" but also seem to
> 	suggest the user agent information logged doesn't have the prefixing
> 	"Mozilla/5.0" you're cited in your client side header.
> 
> 	OR do you possibly have an intervening proxy or something that's
> 	replacing the User Agent being passed -- where does this
> 	"stagefright/1.2" you're citing come from instead of "Mozilla/5.0"?
> 
> 	e.g., here's one of my log file entries for an Android client (edited
> 	to obscure privacy info and wrapped into xx lines to fit reasonable
> 	platen widths):
> 
> XX.XXX.XXX.XXX - - [29/Nov/2012:22:21:36 -0500]
> 	"GET /cgi-bin/fizzbin.php?card=qhears HTTP/1.1" 302 349
> 		"http://xxx.yyy.zzz/cgi-bin/ssredirpg?D=BCT"
> 			"Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SGH-T999
> 				Build/IMM76D) AppleWebKit/534.30 (KHTML, like
> 					Gecko) Version/4.0 Mobile
> 						Safari/534.30"
> 
> 	As you can see, Device ID is there in the raw log file.  My LogFormat
> 	directive is as follows (again, wrapped for clarity):
> 
> 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
> 
> 
> -- 
> J.Lance Wilkinson ("Lance")		InterNet: Lance.Wilkinson@psu.edu
> Systems Design Specialist - Lead	Phone: (814) 865-4870
> Digital Library Technologies		FAX:   (814) 863-3560
> E3 Paterno Library
> Penn State University
> University Park, PA 16802
> http://ucs.psu.edu/home/jlw12@psu.edu?fmt=freebusy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
 		 	   		  

RE: [users@httpd] Android device ID not show on access_log

Posted by "Bennett, Tony" <Be...@con-way.com>.
FYI:  On my DroidX, I have found that the User-Agent sent to apache is different based upon which browser on Android that you use:

Firefox produces:
   "Mozilla/5.0 (Android; Mobile; rv:17.0) Gecko/17.0 Firefox/17.0"

The built-in browser produces:

    "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; DROIDX Build/4.5.1_57_DX8-51) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"


-----Original Message-----
From: J.Lance Wilkinson [mailto:jlw12@psu.edu] 
Sent: Friday, December 07, 2012 5:16 AM
To: users@httpd.apache.org
Cc: jlw12@psu.edu
Subject: Re: [users@httpd] Android device ID not show on access_log

Chau Pham wrote:
> 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

	I use the same version of HTTPD.   MY log files, when I include that
	element in the LogFormat, present the entire string of the user agent
	(not a fragment in the middle like you're describing).   Are you
	examining the actual log files, or are you looking at something
	that has been run through a log file interpreter of some sort, since
	you're not only reporting not seeing the "device id" but also seem to
	suggest the user agent information logged doesn't have the prefixing
	"Mozilla/5.0" you're cited in your client side header.

	OR do you possibly have an intervening proxy or something that's
	replacing the User Agent being passed -- where does this
	"stagefright/1.2" you're citing come from instead of "Mozilla/5.0"?

	e.g., here's one of my log file entries for an Android client (edited
	to obscure privacy info and wrapped into xx lines to fit reasonable
	platen widths):

XX.XXX.XXX.XXX - - [29/Nov/2012:22:21:36 -0500]
	"GET /cgi-bin/fizzbin.php?card=qhears HTTP/1.1" 302 349
		"http://xxx.yyy.zzz/cgi-bin/ssredirpg?D=BCT"
			"Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SGH-T999
				Build/IMM76D) AppleWebKit/534.30 (KHTML, like
					Gecko) Version/4.0 Mobile
						Safari/534.30"

	As you can see, Device ID is there in the raw log file.  My LogFormat
	directive is as follows (again, wrapped for clarity):

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


-- 
J.Lance Wilkinson ("Lance")		InterNet: Lance.Wilkinson@psu.edu
Systems Design Specialist - Lead	Phone: (814) 865-4870
Digital Library Technologies		FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802
http://ucs.psu.edu/home/jlw12@psu.edu?fmt=freebusy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Android device ID not show on access_log

Posted by "J.Lance Wilkinson" <jl...@psu.edu>.
Chau Pham wrote:
> 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

	I use the same version of HTTPD.   MY log files, when I include that
	element in the LogFormat, present the entire string of the user agent
	(not a fragment in the middle like you're describing).   Are you
	examining the actual log files, or are you looking at something
	that has been run through a log file interpreter of some sort, since
	you're not only reporting not seeing the "device id" but also seem to
	suggest the user agent information logged doesn't have the prefixing
	"Mozilla/5.0" you're cited in your client side header.

	OR do you possibly have an intervening proxy or something that's
	replacing the User Agent being passed -- where does this
	"stagefright/1.2" you're citing come from instead of "Mozilla/5.0"?

	e.g., here's one of my log file entries for an Android client (edited
	to obscure privacy info and wrapped into xx lines to fit reasonable
	platen widths):

XX.XXX.XXX.XXX - - [29/Nov/2012:22:21:36 -0500]
	"GET /cgi-bin/fizzbin.php?card=qhears HTTP/1.1" 302 349
		"http://xxx.yyy.zzz/cgi-bin/ssredirpg?D=BCT"
			"Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SGH-T999
				Build/IMM76D) AppleWebKit/534.30 (KHTML, like
					Gecko) Version/4.0 Mobile
						Safari/534.30"

	As you can see, Device ID is there in the raw log file.  My LogFormat
	directive is as follows (again, wrapped for clarity):

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


-- 
J.Lance Wilkinson ("Lance")		InterNet: Lance.Wilkinson@psu.edu
Systems Design Specialist - Lead	Phone: (814) 865-4870
Digital Library Technologies		FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802
http://ucs.psu.edu/home/jlw12@psu.edu?fmt=freebusy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Android device ID not show on access_log

Posted by Chau Pham <ch...@hotmail.com>.
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: 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








 		 	   		  

Re: [users@httpd] Android device ID not show on access_log

Posted by Rich Bowen <rb...@rcbowen.com>.
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







RE: [users@httpd] Android device ID not show on access_log

Posted by Chau Pham <ch...@hotmail.com>.
No, it isn't a header, it's just general situation. I know that apache has a very exellence way to wirte access log for client who use general computer or laptop/notepbook accessing to apache server. in case user uses PC/notebook/laptop, apache writes unique IP address to access_log, in case users uses Iphone/Ipad, apache writes IP address and Device IP to access_log, this case every IPhone/Ipad have the same IP address but difference Device ID. In case user uses Android, I wonder this case, apache write same IP address for every android and not write Device ID. I guess there will be a way to configure apache to write Android Device ID to access_log file.   > Date: Thu, 6 Dec 2012 07:37:25 -0500
> From: covener@gmail.com
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Android device ID not show on access_log
> 
> > how can I configure apache server to show Android device ID?
> 
> Is it part of a header? If so, which one?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
 		 	   		  

Re: [users@httpd] Android device ID not show on access_log

Posted by Eric Covener <co...@gmail.com>.
> how can I configure apache server to show Android device ID?

Is it part of a header? If so, which one?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org