|

AMFWURFLFilter (caching filesystem architecture)

Configuration
PerlSetEnv AMFMobileHome server_root/MobileFilter PerlSetEnv CacheDirectoryStore /tmp
PerlSetEnv CapabilityList xhtml_table_support, is_wireless_device, etc...... #default is all
PerlTransHandler +Apache2::AMFWURFLFilter
Remember: before you start you must have the wurfl.xml file if you want to update the wurfl.xml file each time you stop and start the Apache, you must specify with this parameter:
PerlSetEnv WurflNetDownload true PerlSetEnv DownloadWurflURL http://downloads.sourceforge.net/wurfl/wurfl-latest.zip
If you want to detect the not mobile browser you must need to load the web_browser_patch.xml so set this parameter to true:
PerlSetEnv LoadWebPatch true
If you want to download directly from internet (it’s very slow):
PerlSetEnv PatchWurflNetDownload true PerlSetEnv PatchWurflUrl http://wurfl.sourceforge.net/web_browsers_patch.xml
If you need to add more capabilities or useragents that are not includes into Wurfl add this papameter:
PerlSetEnv PersonalWurflFileName mywurfl.xml
An example of your wurfl.xml is:
<wurfl_patch> <devices> <device user_agent="mickey mouse" fall_back="root" id="generic"> <group id="fb"> <capability name="mynewcapability" value="false"/> </group> </device> <device id="apple_iphone_ver4_3"> <group id="fb"> <capability name="mynewcapability" value="true"/> </group> </device> </devices> </wurfl_patch>
In production is suggested to set the AMFProductionMode on true:
PerlSetEnv AMFProductionMode true
TestPage: http://www.apachemobilefilter.org/test/php_test.php
AMFWURFLFilterMemcached (using memcached ideal for cluster architecture)
In this picture you can see how it's possible to configure AMF in cluster mode with Memcached:

The internal architecture is:

Configuration:
Open the file httpd.conf of your webserver. And configure this few parameter:
PerlSetEnv AMFMobileHome server_root/MobileFilter PerlSetEnv ServerMemCached 10.0.0.15:11211,10.0.0.16:11211,/var/sock/memcahed
PerlSetEnv CapabilityList xhtml_table_support, is_wireless_device, etc...... #default is all
PerlTransHandler +Apache2::AMFWURFLFilterMemCached
Remember: before you start you must have the wurfl.xml file
if you want to update the wurfl.xml file each time you stop and start the Apache, you must specify with this parameter: PerlSetEnv WurflNetDownload true PerlSetEnv DownloadWurflURL http://downloads.sourceforge.net/wurfl/wurfl-latest.zip
If you want to detect the not mobile browser you must need to load the web_browser_patch.xml so set this parameter to true:
PerlSetEnv LoadWebPatch true
If you want to download directly from internet (it’s very slow):
PerlSetEnv PatchWurflNetDownload true PerlSetEnv PatchWurflUrl http://wurfl.sourceforge.net/web_browsers_patch.xml
If you need to add more capabilities or useragents that are not includes into Wurfl add this papameter:
PerlSetEnv PersonalWurflFileName mywurfl.xml
An example of your wurfl.xml is:
<wurfl_patch> <devices> <device user_agent="mickey mouse" fall_back="root" id="generic"> <group id="fb"> <capability name="mynewcapability" value="false"/> </group> </device> <device id="apple_iphone_ver4_3"> <group id="fb"> <capability name="mynewcapability" value="true"/> </group> </device> </devices> </wurfl_patch>
In production is suggested to set the AMFProductionMode on true: PerlSetEnv AMFProductionMode true
TestPage: http://www.apachemobilefilter.org/test/php_test.php
|