EasyEngine with WpTouch-Pro-3


#1

Hi, I have been using EasyEngine for my Wordpress blog on a linode and it works great. I’m using WpTouch-Pro-3 plugin in conjunction with W3 Total Cache plugin (Single site). The issue that I’m running into is that when I view the site in mobile/tablets, it gets switched to Desktop theme instead of staying with the mobile theme.

After contacting WpTouch-Pro-3 support, they recommended to disable the Browser cache in W3 Total Cache plugin which I did but no success since the problem continues to exist.

After googling, I found this thread which is exactly what I need to do:

In EasyEngine setup, the fastcgi configurations are stored in 2 locations:

/etc/nginx/conf.d/fastcgi.conf
/usr/share/easyengine/nginx/conf.d/fastcgi.conf

I searched around in this site but no success. So here’s my question:

  1. To store the different cache for mobile & desktop themes, the post suggests to change the parameter fastcgi_cache_key. Can I simply update both above files or should I directly override this in the site’s nginx config such as in the top of the file above Server configuration? What’s the recommended method?

  2. To purge a selected theme from cache, what changes should I be doing to this configuration?

Since this is on the production site, I don’t want to change them directly w/o understanding the consequences.

Thanks for your support, JK


#2

@jkfriends

1) To store the different cache for mobile & desktop themes, the post suggests to change the parameter fastcgi_cache_key. Can I simply update both above files or should I directly override this in the site’s nginx config such as in the top of the file above Server configuration? What’s the recommended method?

We recommend to add custom changed in site specific nginx configuration.

2) To purge a selected theme from cache, what changes should I be doing to this configuration?

I guess you want to purge mobile cache and keep as it is desktop cache right?


#3

For 1) OK. Should I move all contents of /etc/nginx/conf.d/fastcgi.conf to top of site specific NGINX configuration (i.e., above server line)?

For 2), yes, I want the ability to purge just the mobile version cache if needed.

thanks.


#4

Hi jkfriends,

  1. You should add this configuration in server { Block. as it will be specified for that website. You need to add following in server block.
  
set $mobile_request 0;  
fastcgi_cache_key "$scheme$request_method$host$request_uri$mobile_request";  
if ($http_user_agent ~* "(2\.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine\/3\.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA\/WX310K|LG\/U990|MIDP-2\.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP\.Browser|UP\.Link|webOS|Windows CE|WinWAP|YahooSeeker\/M1A1-R2D2|NF-Browser|iPhone|iPad|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800)" ) {  

	set $mobile_request 1;  

}  

if ($http_cookie ~ 'wptouch-pro-view=desktop') {  
	set $mobile_request 0;  
}  

Note : We don’t tested this on WP Touch Pro. If you face any problem let us know.

  1. We currently have no mechanism to purge mobile version of cache.

#5