<?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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"><channel><title>Disruptive Library Technology Jester &#187; web development</title> <atom:link href="http://dltj.org/tag/webdev/feed/" rel="self" type="application/rss+xml" /><link>http://dltj.org</link> <description>We&#039;re Disrupted, We&#039;re Librarians, and We&#039;re Not Going to Take It Anymore</description> <lastBuildDate>Fri, 18 May 2012 15:43:10 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <cloud domain='dltj.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' /> <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/us/</creativeCommons:license> <item><title>OCLC Introduces an API for Anyone to Access Book Data</title><link>http://dltj.org/article/oclc-worldcat-basic-api/</link> <comments>http://dltj.org/article/oclc-worldcat-basic-api/#comments</comments> <pubDate>Wed, 16 Dec 2009 20:01:37 +0000</pubDate> <dc:creator>Peter Murray</dc:creator> <category><![CDATA[Raw Technology]]></category> <category><![CDATA[OCLC]]></category> <category><![CDATA[rest]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[WorldCat]]></category><guid isPermaLink="false">http://dltj.org/?p=1372</guid> <description><![CDATA[OCLC announced on Monday the availability of a new API for querying the WorldCat database: the WorldCat Basic API. This is a big deal &#8212; it opens up part of the metadata in WorldCat to anyone who wants it (for &#8230; <a href="http://dltj.org/article/oclc-worldcat-basic-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<abbr class="unapi-id ignore noPrint" title="http://dltj.org/?p=1372"></abbr><p>OCLC <a href="http://worldcat.org/blogs/archives/2009/12/a-new-worldcat-api-available-t.htm" title="A new WorldCat API available to all - WorldCat Blog">announced on Monday the availability</a> of a new <acroynm title="Application Programming Interface">API for querying the WorldCat database: the <a href="http://worldcat.org/devnet/wiki/BasicAPIDetails" title="Basic API Details - WorldCat Developers' Network">WorldCat Basic API</a>.  This is a big deal &#8212; it opens up part of the metadata in WorldCat to anyone who wants it (for non-commercial purposes).  Previously, access to WorldCat data through the developer network was limited to institutions that are members of OCLC.  Data returned includes text strings for author names and book titles, ISBN and OCLC identifiers, a link to the HTML display of the record on WorldCat.org, and an optional HTML-formatted citation.</p><p>Getting access to the API is pretty easy.  One <a href="http://worldcat.org/config/" title="WorldCat API Signin/Signup">signs up</a> for an API key that plugs into the URL when making a request.  The key are limited to 1,000 queries per day.  Requests are made to the API using a REST-style URL, and results are returned in <a href="http://worldcat.org/devnet/wiki/BasicAPISampleRSS" title="Basic API Sample RSS - WorldCat Developers' Network">RSS</a> or <a href="http://worldcat.org/devnet/wiki/BasicAPISampleAtom" title="Basic API Sample Atom - WorldCat Developers' Network">Atom</a> format.</p><p>This is incredibly useful for finding out data when what you have is an ISBN.  For example, an API request for ISBN 0-8161-1889-2 would look like this:</p><dl><dt><code>http://worldcat.org/webservices/catalog/search/worldcat/opensearch?</code></dt><dd><code>q=0816118892&amp;</code></dd><dd><code>start=1&amp;</code></dd><dd><code>count=10&amp;</code></dd><dd><code>wskey=<i>omitted</i>&amp;</code></dd><dd><code>format=atom&amp;</code></dd><dd><code>cformat=mla</code></dd></dl><p>&#8230;returns a results set with this data:</p><blockquote><p><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;<br />&lt;feed xmlns="http://www.w3.org/2005/Atom" xmlns:URLEncoder="java://java.net.URLEncoder"<br />&nbsp;&nbsp;&nbsp;&nbsp;xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/"<br />&nbsp;&nbsp;&nbsp;&nbsp;xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"&gt;<br />&nbsp;&nbsp;&lt;title&gt;OCLC Worldcat Search: 0816118892&lt;/title&gt;<br />&nbsp;&nbsp;&lt;id&gt;http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&amp;start=1&amp;count=10&amp;format=atom&amp;wskey=[omitted]&lt;/id&gt;<br />&nbsp;&nbsp;&lt;updated&gt;2009-12-16T13:54:55-05:00&lt;/updated&gt;<br />&nbsp;&nbsp;&lt;subtitle&gt;Search results for 0816118892 at http://worldcat.org/webservices/catalog&lt;/subtitle&gt;<br />&nbsp;&nbsp;&lt;opensearch:totalResults&gt;2&lt;/opensearch:totalResults&gt;<br />&nbsp;&nbsp;&lt;opensearch:startIndex&gt;1&lt;/opensearch:startIndex&gt;<br />&nbsp;&nbsp;&lt;opensearch:itemsPerPage&gt;10&lt;/opensearch:itemsPerPage&gt;<br />&nbsp;&nbsp;&lt;opensearch:Query role="request" searchTerms="0816118892" startPage="1"/&gt;<br />&nbsp;&nbsp;&lt;link rel="alternate"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&amp;start=1&amp;count=10&amp;wskey=[omitted]"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type="text/html"/&gt;<br />&nbsp;&nbsp;&lt;link rel="self"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&amp;start=1&amp;count=10&amp;wskey=[omitted]&amp;format=atom"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type="application/atom+xml"/&gt;<br />&nbsp;&nbsp;&lt;link rel="first"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&amp;start=1&amp;count=10&amp;wskey=[omitted]&amp;format=atom"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type="application/atom+xml"/&gt;<br />&nbsp;&nbsp;&lt;link rel="last"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&amp;start=2&amp;count=10&amp;wskey=[omitted]&amp;format=atom"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type="application/atom+xml"/&gt;<br />&nbsp;&nbsp;&lt;link rel="search" type="application/opensearchdescription+xml"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href="http://worldcat.org/webservices/catalog/opensearch.description.xml"/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&lt;entry&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;author&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;Crawford, Walt.&lt;/name&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/author&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;MARC for library use : understanding integrated USMARC&lt;/title&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link href="http://worldcat.org/oclc/18909048"/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id&gt;http://worldcat.org/oclc/18909048&lt;/id&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;updated&gt;2008-04-03T16:22:32Z&lt;/updated&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;content type="html"&gt;&lt;p class="citation_style_MLA"&gt;Crawford, Walt.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;u&gt;MARC for Library Use: Understanding Integrated<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;USMARC&lt;/u&gt;. [Professional librarian series]. Boston: G.K. Hall, 1989.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/p&gt;&lt;/content&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:0816118876&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:9780816118878&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:0816118892&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:9780816118892&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;oclcterms:recordIdentifier&gt;18909048&lt;/oclcterms:recordIdentifier&gt;<br />&nbsp;&nbsp;&lt;/entry&gt;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;&lt;entry&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;author&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;Crawford, Walt.&lt;/name&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/author&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;MARC for library use : understanding integrated USMARC&lt;/title&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link href="http://worldcat.org/oclc/473475190"/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id&gt;http://worldcat.org/oclc/473475190&lt;/id&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;updated&gt;2009-12-11T02:48:57Z&lt;/updated&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;content type="html"&gt;&lt;p class="citation_style_MLA"&gt;Crawford, Walt.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;u&gt;MARC for Library Use: Understanding Integrated<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;USMARC&lt;/u&gt;. Boston, Mass: G.K. Hall, 1989. &lt;/p&gt;&lt;/content&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:0816118876&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:9780816118878&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:0816118892&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dc:identifier&gt;urn:ISBN:9780816118892&lt;/dc:identifier&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;oclcterms:recordIdentifier&gt;473475190&lt;/oclcterms:recordIdentifier&gt;<br />&nbsp;&nbsp;&lt;/entry&gt;<br />&lt;/feed&gt;</code></p></blockquote><p>From that, one can provide information about other editions of the same work and links back to OCLC for more information and to have people use the locate-in-a-library feature of WorldCat.org.</p><p>The WorldCat Basic API joins other free <a href="http://www.worldcat.org/wcpa/content/affiliate/default.jsp" title="WorldCat Affiliate Tools">WorldCat services</a>.  Unlike the WorldCat Basic API, these services embed pre-formatted HTML into the page without having to understand any coding at all:  the <a href="http://www.worldcat.org/affiliate/tools?atype=listwidget" title="WorldCat 'list' widget">&#8220;list&#8221; widget</a> for displaying a list of items already created in WorldCat; the <a href="http://www.worldcat.org/affiliate/tools?atype=keywordwidget" title="WorldCat 'keyword search' widget">&#8220;keyword search&#8221; widget</a> for displaying the results of a search in WorldCat; the <a href="http://www.worldcat.org/affiliate/tools" title="WorldCat search box">&#8220;search box&#8221; widget</a> that lets users enter a search term and be taken to the full-blown WorldCat.org; and <a href="http://www.worldcat.org/affiliate/tools?atype=text" title="WorldCat embedded search links">embedded search WorldCat links</a> for pre-constructing a search that leads into the full-blown WorldCat.org.  All of these are free for non-commercial use, as described by the <a href="http://www.worldcat.org/ldap/terms.jsp" title="WorldCat">OCLC Affiliate Services Terms and Conditions</a>.</p><p>If I were to have a complaint about the WorldCat Basic API, it would not be about the API itself but rather how it is described on the <a href="http://www.worldcat.org/wcpa/content/affiliate/default.jsp" title="WorldCat Affiliate Tools">WorldCat Affiliate Services page</a>.  Those that have been following OCLC&#8217;s efforts in providing developer API access into WorldCat data know about other services such as the <a href="http://www.worldcat.org/affiliate/tools?atype=wcapi" title="WorldCat Search API">WorldCat Search API</a>, <a href="http://xisbn.worldcat.org/" title="xISBN API">xISBN</a>/<a href="http://xissn.worldcat.org/" title="xISSN API">xISSN</a>, and the <a href="http://www.worldcat.org/affiliate/tools?atype=regdetail" title="WorldCat Registry Search">Registry Search</a>.  What isn&#8217;t clear from any of the pages is &#8220;What is the definition of affiliate?&#8221; and &#8220;Given different tiers of affiliate status, who has access to (how much of) what?&#8221;  Since OCLC is a cooperative organization, does &#8220;Affiliate&#8221; mean a member of the cooperative?  In a conversation with Roy Tennant on the <a href="http://www.code4lib.org/irc" title="IRC | code4lib">code4lib IRC channel</a>, he cleared this up this question: in this case &#8220;affiliate&#8221; means more of the Internet-era definition of the word where a site offers services for other developers to consume.  One is still left with the second question, though, as to what services are available at what limits to which categories of consumers.  For instance, the page describing the xISBN service lists several tiers: free for any non-commercial use up to 500 requests/day, free (presumably with no daily limit) to all OCLC cataloging members, and available on a subscription baseis for non-commercial use that exceeds 500 requests per day or for commercial use.  There a similar tiers described in other services, but there isn&#8217;t an acknowledgement of these tiers on the main WorldCat affiliates page or a convenient list of what is possible in what tiers.  I hope OCLC will consider revising the description of these services to include these details.</acroynm></p>]]></content:encoded> <wfw:commentRss>http://dltj.org/article/oclc-worldcat-basic-api/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Fronting Tomcat with Apache HTTPD to Remove Ports and Context Paths</title><link>http://dltj.org/article/apache-httpd-and-tomcat/</link> <comments>http://dltj.org/article/apache-httpd-and-tomcat/#comments</comments> <pubDate>Thu, 20 Sep 2007 02:31:33 +0000</pubDate> <dc:creator>Peter Murray</dc:creator> <category><![CDATA[Raw Technology]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[httpd]]></category> <category><![CDATA[tomcat]]></category> <category><![CDATA[usability]]></category> <category><![CDATA[web development]]></category><guid isPermaLink="false">http://dltj.org/2007/09/apache-httpd-and-tomcat/</guid> <description><![CDATA[In this How-To guide, I show a combination of software and configuration to clean up URLs by removing the port numbers of the Java servlet engine (Tomcat) and the context path of the application. The goal is to create &#8220;cool &#8230; <a href="http://dltj.org/article/apache-httpd-and-tomcat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<abbr class="unapi-id ignore noPrint" title="http://dltj.org/2007/09/apache-httpd-and-tomcat/"></abbr><p>In this How-To guide, I show a combination of software and configuration to clean up URLs by removing the port numbers of the Java servlet engine (Tomcat) and the context path of the application.  The goal is to create &#8220;<a href="http://www.w3.org/Provider/Style/URI" title="Hypertext Style: Cool URIs don't change.">cool URLs</a>&#8221; that are are short (removing the unnecessary context path) and follow conventions (using the default port &#8220;80&#8243; rather than &#8220;8080&#8243;).  OhioLINK also uses a custom access control module &#8212; built for Apache HTTPD &#8212; which makes the fronting of Apache HTTPD for Tomcat even more desirable.</p><p><h2>Requirement</h2><br />We&#8217;re making use of the latest line of development for the Apache HTTPD series: <a href="http://httpd.apache.org/docs/2.2/" title="Apache HTTPD 2.2.x documentation">version 2.2.x</a>.  The inclusion of <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html" title="Apache HTTPD mod_proxy_ajp documentation">mod_proxy_ajp</a> &#8212; replacing the custom &#8220;mod_jk&#8221; with a module that extends the httpd proxy engine &#8212; in the latest major release of HTTPD makes our task much easier.  This solution also uses HTTPD&#8217;s mod_rewrite and an add-on module called <a href="http://apache.webthing.com/mod_proxy_html/" title="mod_proxy_html Apache HTTPD module homepage">mod_proxy_html</a>.  No additions or changes are needed to the stock Tomcat installation.</p><p><h2>The Plan</h2><br />There are two overall tasks that we&#8217;re going to ask the HTTPD server to do.  First, receive the incoming HTTP request and proxy it to the Tomcat servlet engine using the AJP protocol.  Second, rewrite the URL paths of the headers and the X/HTML body from the Tomcat servlet engine to eliminate any instances of the context path.  In a visual sense, what we are trying to is rewrite the path so it can be processed by Tomcat (the green box) then remove the extraneous parts of the path in the resulting headers and X/HTML (the red box):</p><table cellpadding="2" cellspacing="0"><tr><td align="right"><i>Public Request URLs:&nbsp;&nbsp;</i></td><td colspan="2" align="right">http://e.com</td><td colspan="2">/remaining/path?and=params</td></tr><tr><td align="right"><i>URLs sent to Tomcat:&nbsp;&nbsp;</i></td><td>http://e.com</td><td style="background-color: #FFFFCC; padding-right: 0; margin-right: 0; border-left: 1px solid green; border-top: 1px solid green; border-bottom: 1px solid green;">:8080</td><td style="background-color: #FFFFCC; padding-left: 0; margin-left: 0; border-right: 1px solid green; border-top: 1px solid green; border-bottom: 1px solid green;">/context_path</td><td>/remaining/path?and=params</td></tr><tr><td align="right"><i>URLs as output by Tomcat:&nbsp;&nbsp;</i></td><td>http://e.com</td><td style="background-color: #FFFFCC; padding-right: 0; margin-right: 0; border-left: 1px solid red; border-top: 1px solid red; border-bottom: 1px solid red;">:8080</td><td style="background-color: #FFFFCC; padding-left: 0; margin-left: 0; border-right: 1px solid red; border-top: 1px solid red; border-bottom: 1px solid red;">/context_path</td><td>/next/page</td></tr><tr><td align="right"><i>URLs as seen by browser:&nbsp;&nbsp;</i></td><td colspan="2" align="right">http://e.com</td><td colspan="2">/next/page</td></tr></table><p>The first half of this problem, modifying a request as they come into the Apache HTTPD server, will be handled by a <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" title="Apache HTTPD mod_rewrite documentation">mod_rewrite</a> rule that rewrites the request to something Tomcat can understand then internally redirects it Tomcat via the AJP proxy.  (Note that we are not using simply <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass" title="'ProxyPass' directive in HTTPD mod_proxy documentation">ProxyPass</a> here because we want to send the request through the AJP interface to the Tomcat server, and <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule" title="'RewriteRule' directive in HTTPD mod_rewrite documentation">RewriteRule</a> allows us to do that with a <code>[P]</code> flag at the end of the RewriteRule line.)  The second uses a combination of <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse" title="'ProxyPassReverse' directive in HTTPD mod_proxy documentation">ProxyPassReverse</a> (a part of Apache-supplied mod_proxy extension that adjusts the URL in the Location, Content-Location and URI headers), <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiepath" title="'ProxyPassReverseCookiePath' directive in HTTPD mod_proxy documentation">ProxyPassReverseCookiePath</a> (also a part of the Apache-supplied mod_proxy extension; it rewrites the path string in Set-Cookie headers), and <a href="http://apache.webthing.com/mod_proxy_html/config.html" title="mod_proxy_html configuration documentation">ProxyHTMLURLMap</a> (from mod_proxy_html, a third-party extension that rewrites URLs inside X/HTML documents).</p><p><h2>Preparations</h2><br />The &#8216;mod_proxy_html&#8217; extension is likely new to your Apache HTTPD installation, so we need to download the source, compile it, and move it into the proper directory.  Fortunately, this is rather straight forward:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #ff0000;">'http://apache.webthing.com/mod_proxy_html/mod_proxy_html-2.5.2.c'</span>
apxs <span style="color: #660033;">-c</span> -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>libxml2 <span style="color: #660033;">-i</span> mod_proxy_html-2.5.2.c</pre></div></div><p>Note that we are not using the mod_proxy_html author&#8217;s 3.0 version here.  In my set-up, the 3.0 version was causing Apache HTTPD to dump core on <em>every</em> request (whether proxied or not), and the prior release works just fine for our purposes.  The <code>apxs</code> line will compile, link, and copy the resulting library to the Apache modules directory for us.</p><p><h2>The Configuration</h2><br />This is the contents a &#8216;tomcat-proxy.conf&#8217; file that is placed in the &#8216;conf.d&#8217; directory of the Apache HTTPD configuration directory (most likely <code>/etc/httpd/conf.d/tomcat-proxy.conf</code>, although your installation may vary).</p><div class="wp_syntax"><div class="code"><pre class="config" style="font-family:monospace;">#
#  Information about 'mod_proxy_html' can be found at 
#   http://apache.webthing.com/mod_proxy_html/
LoadFile    /usr/lib/libxml2.so
LoadModule  proxy_html_module    modules/mod_proxy_html-2.5.2.so
&nbsp;
# DON'T TURN ProxyRequests ON!  Bad things will happen
# http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access
# http://www.akadia.com/services/prevent_abuse_proxy.html
ProxyRequests off
&nbsp;
# Necessary to have mod_proxy_html do the rewriting
RequestHeader      unset  Accept-Encoding
&nbsp;
# Rewrite the URLs to proxy (&quot;[P]&quot;) into the Tomcat server
RewriteEngine     on
RewriteRule ^(/.*)      ajp://localhost:8009/context_path/$1    [P]
&nbsp;
# Be prepared to rewrite the HTML/CSS files as they come back
# from Tomcat
SetOutputFilter proxy-html
&nbsp;
# Rewrite JavaScript and CSS files in addition to HTML files
ProxyHTMLExtended on
&nbsp;
# Output Strict XHTML (add &quot;Legacy&quot; to the end of the line below
# to output Transitional XHTML)
ProxyHTMLDoctype XHTML 
&nbsp;
# Rewrite HTTP headers and HTML/CSS links for everything else
ProxyPassReverse /context_path/ /
ProxyPassReverseCookiePath /context_path/ /
ProxyHTMLURLMap /context_path/ /</pre></div></div><p>That&#8217;s pretty much all there is to it.  You should note that mod_proxy_html, like any HTML scraper, requires modestly well-formed X/HTML.  If the markup is bad, the output from mod_proxy_html is likely to be unpredictable.</p>]]></content:encoded> <wfw:commentRss>http://dltj.org/article/apache-httpd-and-tomcat/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> </channel> </rss>
<!-- Served from: dltj.org @ 2012-05-24 17:32:53 by W3 Total Cache -->
