SpillsThrillshttp://spillsthrills.com/
A blog on technology, arts, an occasional culinary topic or two and of course the compulsory random WTF topic to keep things thrilling.
SpillsMango 1.7Mango Blog with IIS 7.5 and Railo<h3>I Need to blog, what to use?<br /></h3>
<p>I had been thinking about blogging for some time and finally decided to take the plunge by setting up my own blog. In my search to find a blogging application, the <a title="Mango Blog" href="http://mangoblog.org" target="_blank">Mango Blog</a> name kept appearing along with a few promising reviews so I decided to give it a whirl. The Mango Blog application uses CFML (Coldfusion Markup Language) and is designed to be easy to theme and extend using an extensible plug-in architecture to expand its' core functionality and as a bonus it is licensed under Apache Version 2.0. While sipping on Mango for a couple of days to get a feel for its performance and ease of use, I decided to setup spillsthrills.com blog with Mango Blog on a Microsoft® IIS box using <a title="Railo CFML open source CFML engine" href="http://en.wikipedia.org/wiki/Railo" target="_blank">Railo</a> (open source CFML engine) and Apache Tomcat using the <a title="BonCode IIS to Tomcat Connector" href="http://tomcatiis.riaforge.org/" target="_blank">BonCode IIS to Tomcat Connector</a>.</p>
<h4>Mango Blog Installation and Possible Setup Issues</h4>
<p>The installation of Mango Blog is relatively quick and straight forward. You simply follow Mango's onscreen install wizard in your browser but, I recommend that you have a DSN already created before you start the process. I encountered an install problem with Mango Blog when my Railo application server couldn't verify an existing DSN because of a certain ASCII character in the password it didn't like and I had to start the entire process over.<br /><br />Once you get Mango Blog installed, go to the admin area and start entering test posts using the default category and one new one, setup a new page, create a comment logged in and logged out. Depending on how your URL rewrites are or aren't being handled, you may need to tweak the <em><strong>setting</strong></em> table. If you have trouble editing the <em><strong>setting</strong></em> table in applications like <a title="MySQL Workbench" href="http://dev.mysql.com/downloads/workbench/5.2.html" target="_blank">MySQL Workbench</a> you will most likey need to alter the table by adding a new integer primary key auto incrementing column. Information on URL configurations for the <em><strong>setting </strong></em>table can be found on the <a title="Mangog Blog FAQ" href="http://mangoblog.org/docs/documentation/faqs" target="_blank">FAQ </a>page at the Mango Blog web site. In order to get the "simple" URL links to resolve correctly with IIS 7.5, I used the Microsoft® <a title="IIS 7 2.0 URL Rewrite" href="http://www.iis.net/download/urlrewrite" target="_blank">URL rewrite 2.0</a> add on. I am not going to give a lot of detail about the rules that I setup other, than to say it took a "little" effort to hammer out something that appears to work. I am not an expert on URL rewriting rules in IIS 7.5 but I offer my rules for your use so that it might help you but, be warned your mileage might vary. I am hopeful that an expert IIS URL rewriter can help me improve the rules I came up with!</p>
<h5>IIS Rewrite Rules Sample</h5>
<p><pre class="brush: ps">
&lt;--! Paste in web.config between system.webServer open and close tags --&gt;
&lt;rewrite&gt;
&lt;outboundRules&gt;
&lt;preConditions&gt;
&lt;preCondition name="ResponseIsHtml1"&gt;
&lt;add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /&gt;
&lt;/preCondition&gt;
&lt;/preConditions&gt;
&lt;/outboundRules&gt;
&lt;rules&gt;
&lt;clear /&gt;
&lt;--! Note all rules assumes root install of Mango if Mango is in blog dir update URL's to blog/admin --&gt;
&lt;--! uncomment replace XXX and YourDomainName if you want to block admin from remote access
&lt;rule name="Mango block remote admin" patternSyntax="ECMAScript" stopProcessing="true"&gt;
&lt;match url="admin(.*)" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false"&gt;
&lt;add input="{REMOTE_ADDR}" pattern="\bXXX\.XXX\.XXX\.XXX\b" negate="true" /&gt;
&lt;/conditions&gt;
&lt;action type="Redirect" url="http://YourDomainName.com" appendQueryString="false" /&gt;
&lt;/rule&gt;
--&gt;
&lt;rule name="Mango archives"&gt;
&lt;match url="archives/(search|category|date)/(.*)" ignoreCase="false" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt;
&lt;action type="Rewrite" url="archives.cfm?{R:1}={R:2}" /&gt;
&lt;/rule&gt;
&lt;rule name="Mango page" stopProcessing="false"&gt;
&lt;match url="page/(.*)" ignoreCase="false" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt;
&lt;action type="Rewrite" url="page.cfm?entry={R:1}" /&gt;
&lt;/rule&gt;
&lt;rule name="Mango post"&gt;
&lt;match url="post/(.*)" ignoreCase="false" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt;
&lt;action type="Rewrite" url="post.cfm?entry={R:1}" /&gt;
&lt;/rule&gt;
&lt;rule name="Mango author"&gt;
&lt;match url="author/(.*)" ignoreCase="false" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt;
&lt;action type="Rewrite" url="author.cfm?alias={R:1}" /&gt;
&lt;/rule&gt;
&lt;rule name="Mango rss"&gt;
&lt;match url="feeds/rss?(/)?(category)?(/)?(.*)" /&gt;
&lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt;
&lt;action type="Rewrite" url="feeds/rss.cfm?{R:2}={R:4}" /&gt;
&lt;/rule&gt;
&lt;/rules&gt;
</pre></p>
<h4>Conclusion</h4>
<p>If you are looking for a blog application you should definitely look at Mango Blog. The highlights of Mango are; its plug-in architecture with an existing collection of ready to use plug-ins and the ability to easily customize the layout with several free themes readily available. In the need imporvements category; no mobile layout yet, no easy way to configure application outside of web root and simple layout adjustments such as default font-size should be accessible inside the admin (of course you can fix the layout issues in the CSS files). I am looking forward to drinking more of the this tasty Mango <em>go go juice</em> and will eventually customize the look and functionality of this blog.</p>
<h5>Late Entry</h5>
<p>I decided to move my blog location after I installed it and this caused an error on startup because of path issues. It took me some time to figure out where Mango Blog was getting the {baseDirectory} variable that was being used in the <em><strong>setting</strong></em> table to help determine application paths. It turns out you have to edit the <em><strong>blog</strong></em> table's basepath and url columns (wish that was in the Mango FAQ's). I have also come across an issue with IE 9 not saving changes when editing previously created content in the admin area.<br /><br />I welcome your comments and suggestions.<br /><br />Spills</p><table><tr><td style="vertical-align:top"><div class="addthis_toolbox addthis_default_style"><a href="http://www.addthis.com/bookmark.php?v=250&amp;username=priteshthecfguy" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_facebook"></a><a class="addthis_button_myspace"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a></div><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b53552355eca066"></script></td></tr></table>http://spillsthrills.com/articles/mango-blog-with-iis-7-5-and-railo
http://spillsthrills.com/articles/mango-blog-with-iis-7-5-and-railoIISMango BlogRailoThu, 08 Sep 2011 15:43:12 GMT