<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jonathan Delgado&#039;s Weblog &#187; filemaker</title>
	<atom:link href="http://www.techno-obscura.com/~delgado/blog/tag/filemaker/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techno-obscura.com/~delgado/blog</link>
	<description>Jonathan&#039;s periodic postings of varying importance</description>
	<lastBuildDate>Sun, 20 Nov 2011 21:01:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apache Proxy for Filemaker 10 Advanced Server IWP</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2009/04/proxy-for-filemaker-10-iwp/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2009/04/proxy-for-filemaker-10-iwp/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 19:41:02 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[filemaker]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=38</guid>
		<description><![CDATA[This isn&#8217;t any major ground breaking discover, not even a minor hack. What it is, however, is a simple solution to a question that didn&#8217;t  turn up any good results when I tried to Google it earlier on. The Problem: I have a user with a Filemaker database that they want to quickly share via [...]]]></description>
			<content:encoded><![CDATA[<p>This isn&#8217;t any major ground breaking discover, not even a minor hack. What it is, however, is a simple solution to a question that didn&#8217;t  turn up any good results when I tried to Google it earlier on.</p>
<p><strong>The Problem</strong>: I have a user with a Filemaker database that they want to quickly share via the Internet, which is generally easy to do using the Instant Web Publishing (IWP). I don&#8217;t, however, want to have the Filemaker server exposed through the firewall. I want to be able to use an Apache server I have sitting on the edge of the network to proxy for it instead.</p>
<p><span id="more-38"></span></p>
<p><strong>The (old) Solution</strong>: With the old Filemaker Server 7 we were able to using the basic Apache mod_proxy using the <code>ProxyPass</code> and <code>ProxyPassReverse</code> directives worked fine. There was a trick though, and that was that you had to proxy back to a specific port on the Filemaker server, port 16080, otherwise your request for http://external.server/fmi/iwp/ would keep redirecting to http://internal.server/fmi/iwp/. So in short our Apache conf would work with: <code><br />
    ProxyPass /fmi/iwp http://internal.server:16080/fmi/iwp<br />
    ProxyPassReverse /fmi/iwp http://internal.server:16080/fmi/iwp<br />
</code></p>
<p>Unfortunately this approach no longer worked when we installed a new Filemaker 10 Advanced Server system. The port 16080 solution no longer existed and the same problems with just doing a straight reverse proxy still existed.</p>
<p><strong>The (new) Solution</strong>: So some simple digging in the Apache config on the Filemaker server showed that Filemaker is simply inserting their own version of mod_jk (they are calling it mod_jk_fm) into Apache and then talking back to their own Tomcat server they installed as part of the package. Right at the end of the httpd.conf they have: <code><br />
Include '/Library/FileMaker Server/Admin/admin-helper/WEB-INF/conf/mod_jk.conf'<br />
</code><br />
and said mod_jk.conf looks like: <code><br />
LoadModule jk_fm_module '/Library/FileMaker Server/Web Publishing/publishing-engine/web-server-support/apache-2.2/mod_jk_fm.so'<br />
JkFmWorkersFile '/Library/FileMaker Server/Admin/admin-helper/WEB-INF/conf/workers.properties'<br />
JkFmLogFile '/Library/FileMaker Server/Logs/web_server_module_log.txt'<br />
JkFmShmFile '/Library/FileMaker Server/Logs/mod_jk_shm.txt'<br />
JkFmLogLevel error<br />
JkFmLogStampFormat "[%a %b %d %H:%M:%S %Y]"<br />
JkFmOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories<br />
JkFmRequestLogFormat "%w %V %T"<br />
JkFmMount /fmi/config config<br />
JkFmMount /fmi/config/* config<br />
JkFmMount /fmi/iwp wpc<br />
JkFmMount /fmi/iwp/* wpc<br />
JkFmMount /fmi/xml/* wpc<br />
JkFmMount /fmi/xsl/cnt/* cwpe<br />
JkFmMount /fmi/xsl/relay/* cwpe<br />
JkFmMount /fmi/xsl/*.xsl cwpe<br />
</code><br />
and the workers.properties file is just: <code><br />
worker.list=wpc,cwpe,config<br />
worker.config1.host=127.0.0.1<br />
worker.config1.type=ajp13<br />
worker.config1.port=16018<br />
worker.config1.lbfactor=1<br />
worker.config2.host=127.0.0.1<br />
worker.config2.type=ajp13<br />
worker.config2.port=16018<br />
worker.config2.lbfactor=1<br />
worker.cwpe1.host=127.0.0.1<br />
worker.cwpe1.type=ajp13<br />
worker.cwpe1.port=16018<br />
worker.cwpe1.lbfactor=1<br />
worker.cwpe2.host=127.0.0.1<br />
worker.cwpe2.type=ajp13<br />
worker.cwpe2.port=16018<br />
worker.cwpe2.lbfactor=1<br />
worker.wpc1.host=127.0.0.1<br />
worker.wpc1.type=ajp13<br />
worker.wpc1.port=16016<br />
worker.wpc1.lbfactor=1<br />
worker.wpc1.retries=20<br />
worker.wpc2.host=127.0.0.1<br />
worker.wpc2.type=ajp13<br />
worker.wpc2.port=16016<br />
worker.wpc2.lbfactor=1<br />
worker.wpc2.retries=20<br />
worker.config.type=lb<br />
worker.config.balance_workers=config1,config2<br />
worker.cwpe.type=lb<br />
worker.cwpe.balance_workers=cwpe1,cwpe2<br />
worker.wpc.type=lb<br />
worker.wpc.balance_workers=wpc1,wpc2<br />
</code></p>
<p>As it turns out, the naive approach/solution is the one that works. FM 10 Server&#8217;s instance of Tomcat is listening on all of the network interfaces, not just the localhost, and will happily accept AJP13 connections from other systems. What I did on my external (proxying) Apache server was to install my own copy of mod_jk and then include my own modified version of the the mod_jk.conf into the man httpd.conf: <code></p>
<p>        JkWorkersFile etc/apache2/workers.properties<br />
        JkLogFile  /var/log/jk.log<br />
        JkShmFile  /var/log/jk-runtime-status<br />
        JkLogLevel error</p>
<p>        JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"<br />
        JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories<br />
        JkRequestLogFormat "%w %V %T"</p>
<p></code><br />
I trimmed down my own workers.properties (using the IP adress of the internal FM server for the host field) to: <code><br />
worker.list=wpc<br />
worker.wpc1.host=###.###.###.###<br />
worker.wpc1.type=ajp13<br />
worker.wpc1.port=16016<br />
worker.wpc1.lbfactor=1<br />
worker.wpc1.retries=20<br />
worker.wpc2.host=###.###.###.###<br />
worker.wpc2.type=ajp13<br />
worker.wpc2.port=16016<br />
worker.wpc2.lbfactor=1<br />
worker.wpc2.retries=20<br />
worker.wpc.type=lb<br />
worker.wpc.balance_workers=wpc1,wpc2<br />
</code><br />
and then in my VirtualHost definition for the proxying site I have:<code><br />
###<br />
# Filemaker 10 server Instant Web Publishing Proxy<br />
###</p>
<p>        JkMount /fmi/iwp wpc<br />
        JkMount /fmi/iwp/* wpc</p>
<p></code></p>
<p>That was it. I think I spent far more time trying to Google an answer to the initial problem than I did in actually solving it once I finally decided to take my own look at things. I am sure there is some sort of life lesson in there, but for the sake of those who don&#8217;t want to learn them themselves, I have provided you with my solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2009/04/proxy-for-filemaker-10-iwp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

