<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Ruslan Sivak - Tomcat</title>
			<link>http://www.ruslansivak.com</link>
			<description>This is the development blog.</description>
			<language>en-us</language>
			<pubDate>Tue, 07 Sep 2010 23:00:56 -0400</pubDate>
			<lastBuildDate>Wed, 02 Dec 2009 17:47:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>russ@ruslansivak.com</managingEditor>
			<webMaster>russ@ruslansivak.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>russ@ruslansivak.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Railo on Tomcat on Windows x64 - Part II</title>
				<link>http://www.ruslansivak.com/2009/12/2/Railo-on-Tomcat-on-Windows-x64--Part-III</link>
				<description>
				
				In the previous two parts we installed Tomcat. Now lets set up Apache httpd server.  

I suggest downloading Apache from  &lt;a href=&quot;http://www.apachelounge.com/download/&quot;&gt;Apache Lounge&lt;/a&gt;.  The nice thing about Apache Lounge&apos;s builds is that they include mod_rewrite and mod_ssl.  

The latest version at the time of this writing is 2.2.14.  Download httpd-2.2.14-win32-x86-ssl.zip and open it in your favorite archiver (mine is &lt;a href=&quot;http://www.rarlab.com/download.htm&quot;&gt;WinRar&lt;/a&gt;).

I recommend taking the Apache2 folder inside the zip file and placing it on c:\.  After you&apos;ve done this you should have a c:\Apache2 folder with many files and subfolders in it.  

Open c:\Apache2\conf\httpd.conf file in your favorite text editor.  I recommend &lt;a href=&quot;http://www.textpad.com/download/index.html&quot;&gt;Textpad&lt;/a&gt;. 

I usually change a few things from the defaults.   Your configuration may differ.  

Change &lt;code&gt;ServerAdmin admin@example.com&lt;/code&gt; to your email address. 

Uncomment the following modules: 
&lt;code&gt;
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule rewrite_module modules/mod_rewrite.so
&lt;/code&gt;
by removing the # sign in front of the line.  

Find the line that says &lt;code&gt;&lt;Directory &quot;c:/Apache2/htdocs&quot;&gt;&lt;/code&gt;

After closing directory tag lets add one allowing access to our web root.  I usually set up a folder or a new drive for it.  Lets say we set up a webroot of &quot;c:\websites&quot;.  Create a folder websites on c: and then inside it create another folder called railotest.  We will use this to set up our test site.  

After the closing &lt;/directory&gt; tag, add a new one allowing access to our web root.  
&lt;code&gt;
&lt;Directory &quot;c:/websites&quot;&gt;
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
&lt;/code&gt;

This will allow Apache to serve from anywhere inside c:\websites.  Alternatively, you can set up a new directory entry for every site that you create, but I find that this makes things easier without significantly impacting security.  

Find the line that says 

&lt;code&gt;
    DirectoryIndex index.html
&lt;/code&gt;

and add index.cfm to that list

&lt;code&gt;
    DirectoryIndex index.html index.cfm
&lt;/code&gt;

Uncomment the line that says &lt;code&gt;#Include conf/extra/httpd-vhosts.conf&lt;/code&gt; by removing the # sign.  

Now open up httpd-vhosts.conf file that is located in &quot;C:\Apache2\conf\extra&quot;.  

There are two sample virtual hosts defined.  Lets comment them both out.  Alternatively you can just delete them. 

&lt;code&gt;
&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot &quot;c:/Apache2/docs/dummy-host.example.com&quot;
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog &quot;logs/dummy-host.example.com-error.log&quot;
    CustomLog &quot;logs/dummy-host.example.com-access.log&quot; common
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot &quot;c:/Apache2/docs/dummy-host2.example.com&quot;
    ServerName dummy-host2.example.com
    ErrorLog &quot;logs/dummy-host2.example.com-error.log&quot;
    CustomLog &quot;logs/dummy-host2.example.com-access.log&quot; common
&lt;/VirtualHost&gt;
&lt;/code&gt;
should look like this:

&lt;code&gt;
#&lt;VirtualHost *:80&gt;
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot &quot;c:/Apache2/docs/dummy-host.example.com&quot;
#    ServerName dummy-host.example.com
#    ServerAlias www.dummy-host.example.com
#    ErrorLog &quot;logs/dummy-host.example.com-error.log&quot;
#    CustomLog &quot;logs/dummy-host.example.com-access.log&quot; common
#&lt;/VirtualHost&gt;
#
#&lt;VirtualHost *:80&gt;
#    ServerAdmin webmaster@dummy-host2.example.com
#    DocumentRoot &quot;c:/Apache2/docs/dummy-host2.example.com&quot;
#    ServerName dummy-host2.example.com
#    ErrorLog &quot;logs/dummy-host2.example.com-error.log&quot;
#    CustomLog &quot;logs/dummy-host2.example.com-access.log&quot; common
#&lt;/VirtualHost&gt;
&lt;/code&gt;

Now lets add a new entry for our test server
&lt;code&gt;
&lt;VirtualHost *:80&gt;
    DocumentRoot &quot;C:/websites/railotest&quot;
    ServerName railotest
    ErrorLog &quot;logs/railotest.com-error.log&quot;
    CustomLog &quot;logs/railotest-access.log&quot; common
&lt;/VirtualHost&gt;
&lt;/code&gt;

Now save the files and lets try running apache and see if it worked. Open up command prompt (Start -&gt; Run -&gt; cmd.exe)

&lt;code&gt;
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator&gt;cd \apache2\bin

C:\Apache2\bin&gt;httpd
httpd: Could not reliably determine the server&apos;s fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
&lt;/code&gt;
We can ignore that warning since we don&apos;t care about the default configuration.  

Now we will need to define a host called railotest using windows hosts file.  Open up &quot;C:\windows\system32\drivers\etc\hosts&quot; file in your favorite text editor.  

After a bunch of comments, you should see 
&lt;code&gt;
127.0.0.1       localhost
&lt;/code&gt;

Lets add an entry for railotest

&lt;code&gt;
127.0.0.1       railotest
&lt;/code&gt;

Now this computer knows that railotest points to 127.0.0.1.  

Lets put a test cfm file in the webroot for railotest.  Create a new file called index.cfm and put it in c:\websites\railotest.  

Inside the file lets put some basic cf code

&lt;code&gt;
&lt;cfdump var=&quot;#server#&quot;&gt;
&lt;/code&gt;

If you still have apache running and put in http://railotest in your browser you should see the code being output.  It is not being interpreted yet because we have not hooked up Apache httpd to Railo.  We will do this in Part IV.  

For now lets set up apache to run as a service. 

First stop the httpd that you ran earlier by entering ctrl-c and do the following.
&lt;code&gt;
C:\Apache2\bin&gt;httpd -k install
Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd: Could not reliably determine the server&apos;s fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
&lt;/code&gt;

The Apache service is now installed.  I recommend also adding the &quot;Apache Monitor&quot; app to your startup folder.  

Click Start-&gt;All Programs and right click on Startup.  Now click &quot;Explore All Users&quot;.  In another explorer window open up C:\Apache2\Bin and right drag ApacheMonitor.exe to the Startup folder.  Let go of the right mouse button and select &quot;Create shortcut here&quot;. 

Double click on the shortcut and the monitor App should appear in your taskbar next to the clock and next to Tomcat&apos;s icon.  

Double click it to open it and click start.  Now you have a working Apache installation that will start as a service.

If you enter http://railotest in your browser, you should see the code we wrote earlier.  This will persist across reboots.  

In the next part, we&apos;ll hook it up to Railo and be able to actually execute this code.
				
				</description>
				
				
				<category>Windows x64</category>
				
				<category>Windows 2003</category>
				
				<category>ColdFusion</category>
				
				<category>Tomcat</category>
				
				<category>Railo</category>
				
				<pubDate>Wed, 02 Dec 2009 17:47:00 -0400</pubDate>
				<guid>http://www.ruslansivak.com/2009/12/2/Railo-on-Tomcat-on-Windows-x64--Part-III</guid>
				
				
			</item>
			
		 	
			</channel></rss>