Spilling Over an Eclectic Mix of Thoughts for Your Thrills.


Mango Blog with IIS 7.5 and Railo

September 8, 2011 · 2 Comments

I Need to blog, what to use?

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 Mango Blog 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 Railo (open source CFML engine) and Apache Tomcat using the BonCode IIS to Tomcat Connector.

Mango Blog Installation and Possible Setup Issues

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.

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 setting table. If you have trouble editing the setting table in applications like  MySQL Workbench 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 setting table can be found on the FAQ 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® URL rewrite 2.0 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!

IIS Rewrite Rules Sample

<--! Paste in web.config between system.webServer open and close tags -->        
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                <clear />
                <--! Note all rules assumes root install of Mango if Mango is in blog dir update URL's to blog/admin -->
                <--! uncomment replace XXX and YourDomainName if you want to block admin from remote access
                <rule name="Mango block remote admin" patternSyntax="ECMAScript" stopProcessing="true">
                    <match url="admin(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REMOTE_ADDR}" pattern="\bXXX\.XXX\.XXX\.XXX\b" negate="true" />
                    <action type="Redirect" url="http://YourDomainName.com" appendQueryString="false" />
                <rule name="Mango archives">
                    <match url="archives/(search|category|date)/(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="archives.cfm?{R:1}={R:2}" />
                <rule name="Mango page" stopProcessing="false">
                    <match url="page/(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="page.cfm?entry={R:1}" />
                <rule name="Mango post">
                    <match url="post/(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="post.cfm?entry={R:1}" />
                <rule name="Mango author">
                    <match url="author/(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="author.cfm?alias={R:1}" />
                <rule name="Mango rss">
                    <match url="feeds/rss?(/)?(category)?(/)?(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="feeds/rss.cfm?{R:2}={R:4}" />


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 go go juice and will eventually customize the look and functionality of this blog.

Late Entry

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 setting table to help determine application paths. It turns out you have to edit the blog 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.

I welcome your comments and suggestions.


Tags: IIS · Mango Blog · Railo

2 responses so far ↓

  • 1 John Sieber // Dec 3, 2011 at 11:06 PM

    Thanks so much for this post. I recently setup a new server with IIS7.5/Railio/Tomcat and was struggling on how to get my SES custom urls working with mangoblog and cfwheels. I found several links that looked promising, but ended up being broken. Your guide was just what I needed.
  • 2 Spills // Dec 4, 2011 at 5:56 PM

    I am glad it helped you!


Leave a Comment

Leave this field empty: