# DeviceMap logcapture prototype httpd config file
# meant to use as an example to configure server logs
#
# To test this, run
#
# export BASE=/usr (adapt for your environment)
# httpd -d $BASE -f $PWD/httpd.conf -C "DocumentRoot $PWD" -k start
#
# and visit http://localhost:9362 with your mobile device to capture
# device info at /tmp/devicemap_access.log
#
# The log file should look like
#
# "GET /devicemap.png?dmap=1&screen.width=1286&screen.height=1929 HTTP/1.1"
# _DMAP:
# x-wap-profile="http://www.htcmms.com.tw/Android/Common/DesireZ/ua-profile.xml"
# UA="Mozilla/5.0 (Linux; U; Android 2.3.3...)"
#
# which provide basic info about the client device
#
Listen 9362
# Load a minimal set of modules
LoadModule dir_module libexec/apache2/mod_dir.so
LoadModule log_config_module libexec/apache2/mod_log_config.so
LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so
LoadModule mime_module libexec/apache2/mod_mime.so
# Serve current folder
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.html
# Minimal httpd setup
ServerName localhost
ServerRoot /tmp
LockFile devicemap_accept.lock
PidFile devicemap_httpd.pid
ErrorLog devicemap_error.log
# Log request path and some useful HTTP headers - the request to
# the dummy image will provide device information
LogLevel info
LogFormat "\"%r\" _DMAP: x-wap-profile=\"%{x-wap-profile}i\" UA=\"%{User-Agent}i\"" combined
CustomLog "devicemap_access.log" combined