Railo SES URL subfolders with Tomcat

This is a continuation of my last post. In my effort to not have a million domain names and hosts file edits; I setup my TOMCAT server on ec2 the same way as the jetty server on my laptop :).  This is to get SES urls to work  on TOMCAT in a subfolder.

To get http://my.ec2-server.com/site1/index.cfm/fuseaction/my.page/test/1  to function properly we do something similar to Jetty.  This time we edit the /opt/railo/tomcat/conf/web.xml  file.  Search for /index.cfm/*


<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>/index.cfm/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>/site1/index.cfm/*</url-pattern>
</servlet-mapping>
Run /opt/railo/railo_ctl restart And you are all set.

Railo SES URL subfolders with Jetty

I've been working my way through learning the ins and outs of Railo over the last few months.  So far I'm impressed, but still trying to figure out all the quirks.

Our sites use Fusebox and SES url's and for some reason they would work on my EC2 instance and not on my laptop.  If I searched for a solution most of the posts were old and pointed to  .cfm/* and .cfc/* needing to be added to the /railo/etc/defaultweb.xml.  It seems in the latest download these are already added.  So that didn't help me.  I finally figured it out though.  When I develop on my laptop I have all my webs in subfolders under the main web root : http://localhost:8888/cfbuilder/site1/index.cfm/fuseaction/my.page/test/1  for example. The mappings only seem to work if the site is in the root.  So to get this to work you have to add : 

<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfm</url-pattern>
<url-pattern>*.cfml</url-pattern>
<url-pattern>*.cfc</url-pattern>
<url-pattern>*.cfm/*</url-pattern>
<url-pattern>*.cfml/*</url-pattern>
<url-pattern>*.cfc/*</url-pattern>
<url-pattern>/*.cfm/*</url-pattern>
<url-pattern>/cfbuilder/site1/index.cfm/*</url-pattern>
</servlet-mapping>

Kinda of a pain to add each site manually to the file, but it works. So I can't complain too much.

Vaughan-Bassett on ABC News made in America

One of our clients was on ABC news Made in America tonight.  A Dallas family replaced all their foreign made items with American made items which from the looks of the clips was harder than they thought.

If you go to the listing of the items they bought for the house the bedroom furniture comes from Vaughan-Bassett in Galax, Virginia.

We built their site on Coldfusion, MYSQL, and Fusebox.

Vaughan-Bassett Furniture

 

 

Yahoo SLURP! why are you so greedy?

Yesterday our servers were being hammered from IP address : 67.195.37.172 which appears to be the Yahoo indexer.  Then today I read a tweet from Ben Nadel he was having the same thing happen.  So I thought I would write a quick post in case some others were having the same issue.

On the Yahoo SLURP! page they suggest adding : 

Crawl-delay:10

to your robots.txt file.  Where the number is the seconds of delay before it hits you with another request.

This seemed to stop the problem unless SLURP! just gave up :)

In doing more research there appears to also be a 

Visit-time: 1800-2330

entry you can make but nothing supports it right now. I added it just in case.

 

Amazon Linux AMI and Coldfusion 9

For fun this weekend I was playing with the Amazon Linux on EC2  with Coldfusion 9.  Since Amazon Linux is based on CENTOS I figured it shouldn't be too hard to get it to work so why not...  I'll make the disclaimer now that CENTOS and Amazon Linux are not offically supported, but we have been running Coldfusion 7/8 on CENTOS for a couple years now and it seems to work great once you get the installer and apache connector to work.

I used Basic 64-bit Amazon Linux AMI 1.0 on a Micro T1 instance for my test.  Setting up launching and connecting to the instance is a bit out of reach for this post, but I just used the AWS console and followed the instructions to create my key-pair to SSH in.

Once you have the instance launched and you are connected you use YUM to install apache:

yum install httpd
yum install httpd-devel
yum install libstdc++.so.5

[The httpd-devl and libstdc++.so.5 are required by the Coldfusion installer]

Then Run:

chkconfig httpd on

[This makes Apache start when the Image starts or you reboot it if you are on an EBS instance]

Then you need to get the Linux 64bit Coldfusion 9 off the Adobe website.  it's kinda silly you can't get to it with Curl, wGet, or Lynx.  So I downloaded it and put it on a private S3 Bucket the used curl to download it to my new instance

Then I followed Willem Redelijkheid's post on installing on CENTOS for directions on installing Coldfusion 9 and it worked like a charm.  Only one slight oddity when the Installer progress bar got to the end on the script it sat there for the longest time.  I hit enter and it displayed the Coldfusion install finished method.  Not sure why.

Hope this helps someone else.  If you are running Coldfusion 9 on Amazon Linux ping me in the comments to let me know how it's going.