<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>jorkeo - hosting geek : core</title><link>http://blogs.technet.com/jorke/archive/tags/core/default.aspx</link><description>Tags: core</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Cat Power - Tomcat on Server 2008 Core with IIS7</title><link>http://blogs.technet.com/jorke/archive/2008/09/17/cat-power-tomcat-on-server-2008-core-with-iis7.aspx</link><pubDate>Wed, 17 Sep 2008 13:51:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3125150</guid><dc:creator>jorkeo</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jorke/comments/3125150.aspx</comments><wfw:commentRss>http://blogs.technet.com/jorke/commentrss.aspx?PostID=3125150</wfw:commentRss><wfw:comment>http://blogs.technet.com/jorke/rsscomments.aspx?PostID=3125150</wfw:comment><description>&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;EPIC START&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So this turned out to be much longer than I thought - the basic goal is to utilise two of the coolest features of Window Server 2008 - Core and IIS7. The idea is to create an ultimately low footprint web server on &lt;a target="_blank" href="http://www.microsoft.com/windowsserver2008/en/us/2008-web.aspx"&gt;Microsoft Windows Web Server 2008 Core&lt;/a&gt; and show how that can easily support the &lt;a target="_blank" href="http://www.apache.org/"&gt;Apache Software Foundation&lt;/a&gt;'s Open Source Java Server - &lt;a target="_blank" href="http://tomcat.apache.org/"&gt;Tomcat&lt;/a&gt;. Ideally I don't want to logon to the console or via Remote Desktop of the server at any point - and I'll use our remote management tools to configure and install in a true 'headless' environment. My Starting point is a clean install of Windows Web Server 2008 Core on Hyper-V, &lt;strong&gt;not on a domain&lt;/strong&gt; and just having had the computer name set to &amp;quot;&lt;strong&gt;servercore&lt;/strong&gt;&amp;quot;. Let see how I go! &lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;Set for Remote Management&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So this the one thing I must do on the console (or I can script it as part of install). I need to configure our remote management tools &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/aa384372(VS.85).aspx"&gt;WinRM&lt;/a&gt; to allow connections from my workstation to the server. (note that you should NOT leave WinRM with Basic auth set to true in a production environment - I need to do this because the machine is not in a domain)&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WinRM quickconfig      &lt;br /&gt;WinRM set winrm/config/service/auth @{Basic=&amp;quot;true&amp;quot;}       &lt;br /&gt;WinRM set winrm/config/client @{TrustedHosts=&amp;quot;jorkeo-hp&amp;quot;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WinRM set winrm/config/service/auth @{Basic=&amp;quot;true&amp;quot;}      &lt;br /&gt;WinRM set winrm/config/client @{TrustedHosts=&amp;quot;servercore&amp;quot;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now I connect to the server from the command prompt on my workstation (&amp;quot;&lt;strong&gt;jorkeo-hp&lt;/strong&gt;&amp;quot;) using &lt;a target="_blank" href="http://blogs.technet.com/server_core/archive/2006/08/11/446122.aspx"&gt;WinRS&lt;/a&gt;, and I'm going to instantiate a remote command prompt:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WinRS -r:servercore -u:Administrator -p:****** cmd.exe&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb_5.png" width="514" height="105" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now we have our remote shell - all commands from this point forward are run here.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Install Basic IIS requirements&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Normally I would use &lt;a target="_blank" href="http://technet.microsoft.com/en-us/library/cc766272.aspx"&gt;ocsetup&lt;/a&gt; to install everything with dependencies, but since I'm attempting a low footprint web server I want pick the exact packages I need to install without installing everything - to do this I use package manager - &lt;a target="_blank" href="http://technet.microsoft.com/en-us/library/cc749465.aspx"&gt;pkgmgr&lt;/a&gt; - and select the roles/modules to install.&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-Security;IIS-BasicAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementScriptingTools;WAS-WindowsActivationService;WAS-ProcessModel;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Installation dependencies can be found here:&lt;a href="http://learn.iis.net/page.aspx/130/understanding-setup-in-iis-7/"&gt;http://learn.iis.net/page.aspx/130/understanding-setup-in-iis-7/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then you need to create the site under IIS7 to host your servlets.&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;mkdir c:\inetpub\mytomcat&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;C:\windows\system32\inetsrv\appcmd.exe add site /name:&amp;quot;mytomcat.com&amp;quot; /bindings:&lt;/font&gt;&lt;a href="http://mytomcat.com:80"&gt;&lt;font size="2" face="Courier New"&gt;http://mytomcat.com:80&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Courier New"&gt;      &lt;br /&gt;/physicalPath:&amp;quot;c:\inetpub\mytomcat&amp;quot;       &lt;br /&gt;SITE object &amp;quot;mytomcat.com&amp;quot; added      &lt;br /&gt;APP object &amp;quot;mytomcat.com/&amp;quot; added      &lt;br /&gt;VDIR object &amp;quot;mytomcat.com/&amp;quot; added&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;c:\windows\system32\inetsrv\appcmd.exe add apppool /name:mytomcat&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;APPPOOL object &amp;quot;tomcat&amp;quot; added&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;c:\windows\system32\inetsrv\appcmd.exe set site &amp;quot;mytomcat.com&amp;quot;      &lt;br /&gt;/applicationDefaults.applicationPool:&amp;quot;mytomcat&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;SITE object &amp;quot;mytomcat.com&amp;quot; changed&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Install JRE + Tomcat&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now we need to install the Java Runtime Environment - I just download the latest one from &lt;a href="http://java.sun.com"&gt;http://java.sun.com&lt;/a&gt; and install with defaults, the version I ended up with was JRE6 update 7 - the offline installation - I then ran the installer like so:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;jre-6u7-windows-i586-p.exe /passive&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Verified that was in place, by looking for the java directories under &lt;strong&gt;\Program Files&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Then just downloaded the latest version of &lt;a target="_blank" href="http://tomcat.apache.org/download-60.cgi?Preferred=http%3A%2F%2Fapache.mirror.aussiehq.net.au"&gt;Apache Tomcat&lt;/a&gt; from my buddies at &lt;a target="_blank" href="http://www.aussiehq.com.au/"&gt;AussieHQ&lt;/a&gt;. There are a couple of ways you can deploy this, by running the installer service/downloading the file - I like to run the installer on a reference machine then copy the contents of the tomcat directory to the server - it seems to clear out all the unnecessary stuff at installation time. I've copied my contents of a reference install to &lt;strong&gt;c:\tomcat&lt;/strong&gt; on &lt;strong&gt;servercore&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Run Tomcat as a service&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now this took aaaggess as the installation syntax is overly sensitive, case sensitive etc. So to save you the time here is my installation script line to install with all options pointing to my new installation of JRE:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;tomcat6.exe //IS//Tomcat6 --Install=&amp;quot;c:\tomcat\bin\tomcat6.exe&amp;quot; --StartClass=org.apache.catalina.startup.Bootstrap --StopClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopParams=stop --JvmOptions &amp;quot;-Dcatalina.home=c:\tomcat;-Dcatalina.base=c:\tomcat;-Djava.endorsed.dirs=c:\tomcat\common\endorsed;-Djava.io.tmpdir=c:\tomcat\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=c:\tomcat\conf\logging.properties;&amp;quot; --Jvm=&amp;quot;C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll&amp;quot; --JavaHome=&amp;quot;C:\Program Files\Java\jre1.6.0_07&amp;quot; --Classpath=&amp;quot;c:\tomcat\bin\bootstrap.jar&amp;quot; --LogPath=c:\tomcat\logs --StdError=auto --StdOutput=auto --StartPath=c:\tomcat --StopPath=c:\tomcat --StartMode=jvm --StopMode=jvm&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;At this point I found that tomcat would fail to start&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;font face="Courier New"&gt;C&lt;/font&gt;&lt;font size="2" face="Courier New"&gt;:\tomcat\bin&amp;gt;net start tomcat6        &lt;br /&gt;The Tomcat6 service is starting.         &lt;br /&gt;The Tomcat6 service could not be started. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;A service specific error occurred: 0. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;More help is available by typing NET HELPMSG 3547. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;C:\tomcat\bin&amp;gt;C:\tomcat\bin&amp;gt;tomcat6 //TS//Tomcat6      &lt;br /&gt;C:\tomcat\bin&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;hmmm nothing... looking in &lt;strong&gt;tomcat\logs &lt;/strong&gt;folder the &amp;quot;&lt;strong&gt;jakarta_service.log&lt;/strong&gt;&amp;quot; file seemed to be the latest timestamp, opening that in notepad and its full of this:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;2008-09-16 12:39:50] [info] Procrun (2.0.3.0) started      &lt;br /&gt;[2008-09-16 12:39:50] [info] Debugging Service...       &lt;br /&gt;[2008-09-16 12:39:50] [info] Starting service...       &lt;br /&gt;[2008-09-16 12:39:50] [174&amp;#160; javajni.c] [error] The specified module could not be found.       &lt;br /&gt;[2008-09-16 12:39:50] [986&amp;#160; prunsrv.c] [error] Failed creating java C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll       &lt;br /&gt;[2008-09-16 12:39:50] [1260 prunsrv.c] [error] ServiceStart returned 1       &lt;br /&gt;[2008-09-16 12:39:50] [info] Debug service finished.       &lt;br /&gt;[2008-09-16 12:39:50] [info] Procrun finished.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;which appears to be a problem finding an api to connect to, but the error is pretty vague as to &lt;strong&gt;what&lt;/strong&gt; its actually trying to do.. &lt;/p&gt;  &lt;p&gt;GROAN - this is the FIRST time i have to logon to the server via RDP/Console.. remember everything else so far has been via a remote &lt;a target="_blank" href="http://blogs.technet.com/server_core/archive/2006/08/11/446122.aspx"&gt;winrs&lt;/a&gt; console...&lt;/p&gt; &lt;a target="_blank" href="http://failblog.org/2008/05/12/plunger-cat/"&gt;&lt;img border="0" alt="Plunger Cat Fail" src="http://failblog.wordpress.com/files/2008/05/plungerfail.jpg?w=500" /&gt;&lt;/a&gt;   &lt;p&gt;Log On... Fire up &lt;a target="_blank" href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;sysinternals Process Monitor&lt;/a&gt; (thank you &lt;a target="_blank" href="http://blogs.technet.com/sysinternals/archive/2008/08/08/new-coreinfo-v1-0-updates-process-monitor-v1-37-handle-v3-4-process-explorer-v11-21-debugview-4-75-mark-s-events-keynote-speaker-at-virtualization-congress.aspx"&gt;Mr Russinovich&lt;/a&gt;) to see what this tomcat process is trying to talk to (after some thought, I reckon I could probably spawn this remotely with a backing file to disk and load that on another machine... but too much stuffing around..). After attaching to the tomcat process, aha - there it is:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_2.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb.png" width="451" height="68" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When the tomcat process fires up it pokes around the OS looking for &lt;strong&gt;MSVCR71.dll&lt;/strong&gt; - which is the a bunch of C libraries generally shipped with the Microsoft C runtime library. So all I needed to do is find that file and put it in path - hang- on.. I remembered back to my Java development days in University - pretty sure that the JRE ships with the libraries in tow... ah... looking into the &lt;strong&gt;JRE\bin&lt;/strong&gt; directory of my Java Runtime Environment install, there it is, I'll copy that to my &lt;strong&gt;tomcat\bin&lt;/strong&gt; folder and try again. &lt;/p&gt;  &lt;p&gt;Ok - lets log off that server real quick - and back to our remote shell.&lt;/p&gt;  &lt;p&gt;So I kicked off starting tomcat from the command line again.. success!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_4.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb_1.png" width="463" height="251" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You'll see its started with the default of http listening on port 8080 - so browsing to this (hoping no random proxy in the way) - Yee ha!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_6.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb_2.png" width="460" height="115" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Awesome, now I just have to CTRL-BREAK out of that and start the service:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;C:\tomcat\bin&amp;gt;net start tomcat6     &lt;br /&gt;The Tomcat6 service is starting.      &lt;br /&gt;The Tomcat6 service was started successfully.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And test again - also a Screen shot to prove it:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb_4.png" width="478" height="52" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;But this is only the first step - Now I need to serve Tomcat through IIS7.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Setting up the IIS ISAPI Redirector&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Download the IIS Tomcat connector - &lt;a title="http://tomcat.apache.org/download-connectors.cgi" href="http://tomcat.apache.org/download-connectors.cgi"&gt;http://tomcat.apache.org/download-connectors.cgi&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The connector acts as a broker between IIS and Tomcat and as far as IIS is concerned just an &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Isapi"&gt;ISAPI&lt;/a&gt; filter.&lt;/p&gt;  &lt;p&gt;For this example I've grabbed &lt;strong&gt;isapi_redirect-1.2.26.dll&lt;/strong&gt; - and renamed it to &lt;strong&gt;isapi_redirect.dll&lt;/strong&gt; just to make it easy. &lt;/p&gt;  &lt;p&gt;Now this is where your configuration choice can get interesting. Depending on how you're supporting tomcat you have the choice of using the registry for storing configuration information for the &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Isapi"&gt;ISAPI&lt;/a&gt; filter OR using a file. This of course depends on how you intend to host it as well. If you intend host this in a multi-tenant environment with several java sites on the same server and possibly different customers as well I would recommend using a file based approach as you can set a configuration file per site. If you are just looking after one site on the server, registry configuration is fine. One thing to remember though, is when you need to replicate the configuration to another server then you will have to make sure the registry entries follow the site.&lt;/p&gt;  &lt;p&gt;For the purposes of this example, I'm going to attempt a multi-tenant configuration to allow the most flexibility, plus prevents me from having to play in the registry. When you need to create another site on the same server, create a new folder for the site under &lt;strong&gt;tomcat\conf&lt;/strong&gt; and &lt;strong&gt;tomcat\logs&lt;/strong&gt; and simply follow these steps for each new site :) (or script it)&lt;/p&gt;  &lt;p&gt;1. Create a folder under the website root called &lt;strong&gt;jakarta&lt;/strong&gt;     &lt;br /&gt;2. Copy the &lt;strong&gt;isapi_redirect.dll&lt;/strong&gt; into the &lt;strong&gt;jakarta&lt;/strong&gt; folder.     &lt;br /&gt;3. Create a file in the &lt;strong&gt;jakarta&lt;/strong&gt; folder called &lt;strong&gt;isapi_redirect.properties &lt;/strong&gt;(note that the name before the extension MUST match the dll filename)     &lt;br /&gt;4. Edit the isapi_redirect.properties file in notepad (server core IDE) - paste in the following:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Configuration file for the Jakarta ISAPI Redirector &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# The path to the ISAPI Redirector Extension, relative to the website      &lt;br /&gt;# This must be in a virtual directory with execute privileges       &lt;br /&gt;extension_uri=/jakarta/isapi_redirect.dll &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Full path to the log file for the ISAPI Redirector      &lt;br /&gt;log_file=c:\tomcat\logs\mytomcat\isapi_redirect.log &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Log level (debug, info, warn, error or trace)      &lt;br /&gt;log_level=INFO&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Full path to the workers.properties file      &lt;br /&gt;worker_file=c:\tomcat\conf\mytomcat\workers.properties &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Full path to the uriworkermap.properties file      &lt;br /&gt;worker_mount_file=c:\tomcat\conf\mytomcat\uriworkermap.properties &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;5. You can see that the&lt;strong&gt; log_file&lt;/strong&gt; directive is going to a folder that doesn't exist so we need to create the folder &lt;strong&gt;tomcat\logs\mytomcat\&lt;/strong&gt; - and also the configuration folder &lt;strong&gt;tomcat\conf\mytomcat\&lt;/strong&gt; - by creating a separate folder for each site you allow the separation of site logging and configuration.     &lt;br /&gt;6. Now we need to create the &lt;strong&gt;workers.properties&lt;/strong&gt; and &lt;strong&gt;uriworkermap.properties&lt;/strong&gt; files under the&lt;strong&gt; tomcat\conf\tomcatsite1\&lt;/strong&gt; folder. Create the worker.properties file first - This controls the configuration of tomcat worker processes allows control of resources to the site - something best left to the server administrators (&lt;a target="_blank" href="http://tomcat.apache.org/connectors-doc/generic_howto/workers.html"&gt;more info on tomcat workers&lt;/a&gt;) - lets create the file &lt;strong&gt;notepad.exe tomcat\conf\mytomcat\workers.properties&lt;/strong&gt; - and populate with the following:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# list of workers &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;worker.list=mytomcat,ajp13      &lt;br /&gt;worker.mytomcat.type=ajp13       &lt;br /&gt;worker.ajp13.type=ajp13 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# worker mytomcat      &lt;br /&gt;worker.mytomcat.host=localhost       &lt;br /&gt;worker.mytomcat.port=8009       &lt;br /&gt;worker.mytomcat.lbfactor=1 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# worker ajp13      &lt;br /&gt;worker.ajp13.host=localhost       &lt;br /&gt;worker.ajp13.port=8009       &lt;br /&gt;worker.ajp13.lbfactor=1 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;# time out          &lt;br /&gt;worker.mytomcat.connection_pool_timeout=600           &lt;br /&gt;worker.mytomcat.socket_timeout=60&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;You can see here we are trying to make sure we keep the naming specific to the site. Save the worker.properties file, then create the &lt;strong&gt;uriworkermap.properties&lt;/strong&gt; file - &lt;strong&gt;notepad.exe tomcat\conf\mytomcat\uriworkermap.properties&lt;/strong&gt; - this is where we map the request to the tomcat worker process. There is a whole level of URI re-mapping you can do here, but for the moment we are just going to take everything that comes to the site is fed to tomcat - just make sure we match up with the worker specified in the &lt;strong&gt;workers.properties&lt;/strong&gt; file.&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;# Use www.foo.org as virtual host      &lt;br /&gt;# /www.foo.org/myapp/*=myworker       &lt;br /&gt;# Normal mapping &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;/mytomcat.com/*=mytomcat      &lt;br /&gt;/mytomcat.com/=mytomcat&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Save that file.&lt;/p&gt;  &lt;p&gt;7. The last bit of hacking around in tomcat is that we need to tell it that we've setup a site for it to to be aware of. To kick this I opened the file &lt;strong&gt;tomcat\conf\server.xml&lt;/strong&gt; in notepad.&lt;/p&gt;  &lt;p&gt;Between the &lt;strong&gt;&amp;lt;Service&amp;gt;&lt;/strong&gt; xml tags another &lt;strong&gt;&amp;lt;Engine&amp;gt;&lt;/strong&gt; tag that describes our site needs to put into place - this is the syntax I entered:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;&amp;lt;Engine name=&amp;quot;Catalina&amp;quot; defaultHost=&amp;quot;mytomcat.com&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Host name=&amp;quot;mytomcat.com&amp;quot; appBase=&amp;quot;c:\inetpub\mytomcat&amp;quot; unpackWARs=&amp;quot;true&amp;quot; autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Valve className=&amp;quot;org.apache.catalina.valves.RequestDumperValve&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Valve className=&amp;quot;org.apache.catalina.valves.AccessLogValve&amp;quot; directory=&amp;quot;c:\tomcat\logs\mytomcat&amp;quot; prefix=&amp;quot;mytomcat_access_log.&amp;quot; suffix=&amp;quot;.log&amp;quot; pattern=&amp;quot;common&amp;quot; resolveHosts=&amp;quot;false&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Host&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Engine&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;( Note the Valves in place to dump engine logs - http access etc )&lt;/p&gt;  &lt;p&gt;You will need to restart the tomcat service to pick up these changes - if any weirdness happens just run the service from the console to pick up any issues.&lt;/p&gt;  &lt;p&gt;8. Now we need to tell IIS that we're using an ISAPI filter to serve the content - we just need to add the ISAPI filter via APPCMD. First allow the ISAPI filter into the CGI/ISAPI restriction policy - then we unlock the handlers config in applicationhost.config then actually add the &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Isapi"&gt;ISAPI&lt;/a&gt; filter.&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;appcmd.exe set config&amp;#160; -section:system.webServer/security/isapiCgiRestriction      &lt;br /&gt;/+&amp;quot;[path='c:\inetpub\mytomcat\jakarta\isapi_redirect.dll',allowed='True',description='tomcat']&amp;quot; /commit:apphost&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;c:\windows\system32\inetsrv\appcmd.exe unlock config /section:system.webserver/handlers&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Unlocked section &amp;quot;system.webServer/handlers&amp;quot; at configuration path &amp;quot;MACHINE/WEBROOT/APPHOST&amp;quot;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;c:\windows\system32\inetsrv\appcmd.exe set config &amp;quot;mytomcat.com&amp;quot;      &lt;br /&gt;&lt;/font&gt;&lt;font size="2" face="Courier New"&gt;-section:system.webServer/handlers      &lt;br /&gt;/+&amp;quot;[name='tomcat',path='*',verb='*',       &lt;br /&gt;scriptProcessor='c:\inetpub\mytomcat\jakarta\isapi_redirect.dll']&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;Applied configuration changes to section &amp;quot;system.webServer/handlers&amp;quot; for &amp;quot;MACHIN     &lt;br /&gt;E/WEBROOT/APPHOST/mytomcat.com&amp;quot; at configuration commit path &amp;quot;MACHINE/WEBROOT/APPHOST/mytomcat.com&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;9. One thing I almost forgot is that we need make sure that the context our site is running on has the ability to read the tomcat configuration and files. Because our application pool runs as the built in account - &amp;quot;&lt;strong&gt;Network Service&lt;/strong&gt;&amp;quot; I have to ensure it can read and write in the appropriate locations around tomcat. Now I'm being a little lazy here - if I really wanted to lock it down I would create a user account, remove it from all groups and then sit with &lt;a target="_blank" href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process Monitor&lt;/a&gt; and find the exact settings required. But this is enough to get me over the hump. Allowing read to all of &lt;strong&gt;tomcat&lt;/strong&gt;, and allowing write to &lt;strong&gt;tomcat\logs&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;cacls c:\tomcat /T /E /C /G &amp;quot;NETWORK SERVICE&amp;quot;:R&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;cacls c:\tomcat\logs /T /E /C /G &amp;quot;NETWORK SERVICE&amp;quot;:C&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;10. Finally we need to drop some content to serve, I'm just going to drop in the examples that ship with the default tomcat build, normally found in the &lt;strong&gt;tomcat\webapps\examples&lt;/strong&gt; folder. I've just copied all the files into the root of my site and now lets browse to my site &lt;strong&gt;http://mytomcat.com&lt;/strong&gt;&lt;a title="http://mytomcat.com/servlets/servlet/HelloWorldExample" href="http://mytomcat.com/servlets/servlet/HelloWorldExample"&gt;&lt;strong&gt;/servlets/servlet/HelloWorldExample&lt;/strong&gt;&lt;/a&gt; (local demo site) ... and:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_8.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jorke/WindowsLiveWriter/9a0bfb6c0d5c_B772/image_thumb_3.png" width="459" height="140" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Its working - HOORAY!&lt;/p&gt;  &lt;p&gt;Just to verify, looking at my IIS logs you can see the requests coming through to the server:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;008-09-17 00:50:32 192.168.0.2 GET /servlets/servlet/HelloWorldExample - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9)+Gecko/2008052906+Firefox/3.0+(.NET+CLR+3.5.30729) JSESSIONID=A86ABA6C645C8FC922551765899D09A0 - mytomcat.com 200 0 0 511 513 194      &lt;br /&gt;2008-09-17 00:50:32 192.168.0.2 GET /servlets/images/code.gif - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9)+Gecko/2008052906+Firefox/3.0+(.NET+CLR+3.5.30729) JSESSIONID=A86ABA6C645C8FC922551765899D09A0 &lt;/font&gt;&lt;a href="http://mytomcat.com/servlets/servlet/HelloWorldExample"&gt;&lt;font size="2" face="Courier New"&gt;http://mytomcat.com/servlets/servlet/HelloWorldExample&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Courier New"&gt; mytomcat.com 200 0 0 519 538 17      &lt;br /&gt;2008-09-17 00:50:32 192.168.0.2 GET /servlets/images/return.gif - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9)+Gecko/2008052906+Firefox/3.0+(.NET+CLR+3.5.30729) JSESSIONID=A86ABA6C645C8FC922551765899D09A0 &lt;/font&gt;&lt;a href="http://mytomcat.com/servlets/servlet/HelloWorldExample"&gt;&lt;font size="2" face="Courier New"&gt;http://mytomcat.com/servlets/servlet/HelloWorldExample&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Courier New"&gt; mytomcat.com 200 0 0 1460 540 21      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The request loads through the ISAPI filters, so looking at the tomcat access logs:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;127.0.0.1 - - [17/Sep/2008:10:44:33 +1000] &amp;quot;GET /servlets/servlet/HelloWorldExample HTTP/1.1&amp;quot; 200 359      &lt;br /&gt;127.0.0.1 - - [17/Sep/2008:10:44:38 +1000] &amp;quot;GET /servlets/servlet/HelloWorldExample HTTP/1.1&amp;quot; 200 359       &lt;br /&gt;127.0.0.1 - - [17/Sep/2008:10:44:55 +1000] &amp;quot;GET /servlets/servlet/HelloWorldExample HTTP/1.1&amp;quot; 200 359       &lt;br /&gt;127.0.0.1 - - [17/Sep/2008:10:45:12 +1000] &amp;quot;GET /servlets/servlet/HelloWorldExample HTTP/1.1&amp;quot; 200 359       &lt;br /&gt;127.0.0.1 - - [17/Sep/2008:10:45:57 +1000] &amp;quot;GET /servlets/servlet/HelloWorldExample HTTP/1.1&amp;quot; 200 359&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;Further Security Lock Downs&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;One very important you should to for your site is to ensure that the jakarta folder is blocked from http reading, i.e. just being able to browse to it - this can be controlled by the request filtering feature that is built into IIS7. To protect the folder, very simply appcmd directive:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;appcmd.exe set config &amp;quot;mytomcat.com/jakarta&amp;quot; -section:system.webServer/security/requestFiltering /+&amp;quot;hiddenSegments.[segment='jakarta']&amp;quot;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Then remember to rollback the WinRM configuration when going into production:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;WinRM set winrm/config/service/auth @{Basic=&amp;quot;false&amp;quot;}&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="5"&gt;&lt;strong&gt;EPIC DONE!&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And we are done - so this is my no means an exhaustive configuration guide - merely a glimpse of how you can configure some competitive technologies with Windows Server 2008 Core and IIS7.&lt;/p&gt;  &lt;p&gt;- jorke&lt;/p&gt;  &lt;p&gt; p.s. (Fineprint) this whole post is totally without warranty, if you try this and it works or doesn't work its not my fault. If you girlfriend/wife/cat leaves you because of this - believe me it wasn't this - you have something else to worry about..&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e840150e-52f2-41cb-abaf-71c350cdf127" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Server%20Core" rel="tag"&gt;Server Core&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Tomcat" rel="tag"&gt;Tomcat&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Apache%20Tomcat" rel="tag"&gt;Apache Tomcat&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS7" rel="tag"&gt;IIS7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows" rel="tag"&gt;Windows&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Java" rel="tag"&gt;Java&lt;/a&gt;,&lt;a href="http://technorati.com/tags/JSP" rel="tag"&gt;JSP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Servlets" rel="tag"&gt;Servlets&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3125150" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jorke/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/jorke/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.technet.com/jorke/archive/tags/apache/default.aspx">apache</category><category domain="http://blogs.technet.com/jorke/archive/tags/CGI/default.aspx">CGI</category><category domain="http://blogs.technet.com/jorke/archive/tags/core/default.aspx">core</category><category domain="http://blogs.technet.com/jorke/archive/tags/Open+Source/default.aspx">Open Source</category><category domain="http://blogs.technet.com/jorke/archive/tags/tomcat/default.aspx">tomcat</category></item><item><title>Installing FTP with IIS7 on 2008 Server Core</title><link>http://blogs.technet.com/jorke/archive/2008/06/05/installing-ftp-with-iis7-on-2008-server-core.aspx</link><pubDate>Thu, 05 Jun 2008 10:36:51 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3080692</guid><dc:creator>jorkeo</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jorke/comments/3080692.aspx</comments><wfw:commentRss>http://blogs.technet.com/jorke/commentrss.aspx?PostID=3080692</wfw:commentRss><wfw:comment>http://blogs.technet.com/jorke/rsscomments.aspx?PostID=3080692</wfw:comment><description>&lt;p&gt;I had a few questions from an old colleague, &lt;a href="http://twitter.com/virgilwashere" target="_blank"&gt;Virgil&lt;/a&gt;, who had just built a 2008 server core machine and was having issues configuring FTP. Without asking I knew &lt;a href="http://twitter.com/virgilwashere" target="_blank"&gt;Virgil&lt;/a&gt; would be chasing an FTP server that would have some method of secure transport such as FTPS and pluggable authentication methods, I know this because he's an interoperable kind of guy :)&lt;/p&gt;  &lt;p&gt;He'd already been trying to configure this with the default install of FTP that comes with Server 2008, but I recommended that he use the downloadable version from the &lt;a href="http://iis.net" target="_blank"&gt;iis.net&lt;/a&gt; website. Only issue here is that you have to uninstall the old FTP server before that will install, then configure the service all over again... so after about 30 minutes of furious IM conversations this is how we did it..&lt;/p&gt;  &lt;p&gt;First we uninstalled the FTP Service that comes with 2008 :&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;start /w pkgmgr /uu:IIS-FTPPublishingService;IIS-FTPServer&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Then downloaded the FTP publishing service for IIS 7, with the friendly name of FTP7;   &lt;br /&gt; - x86 - &lt;a title="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1619" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1619"&gt;http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1619&lt;/a&gt;    &lt;br /&gt; - x64 - &lt;a title="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1620" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1620"&gt;http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1620&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;and installed it:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;msiexec /i ftp7_x86_rtw.msi&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Once that was in we simply had add the appropriate bindings to the site, like so (Make sure you close your quotes properly or it goes NUTS!) :&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;c:\windows\system32\inetsrv\appcmd.exe set site /site.name:&amp;quot;Default Web Site&amp;quot; /+bindings.[protocol='ftp',bindingInformation=&amp;quot;*:21:&amp;quot;]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;then we simply had to set an authorised user to the server:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;c:\windows\system32\inetsrv\appcmd.exe set config &amp;quot;Default Web Site&amp;quot; /sectionystem.ftpserver/security/authorization /+[accessType='Allow',permissions='Read,Write',roles='',users='ftpuser'] /commit:apphost&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And we were done! (or so we thought!).... On attempting to connect to the FTP server we ended up with the error : &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;534-Policy requires SSL.     &lt;br /&gt; Win32 error:&amp;#160;&amp;#160; Access is denied.      &lt;br /&gt; Error details: SSL policy requires SSL for control channel.      &lt;br /&gt;534 End      &lt;br /&gt;Login failed.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;ahh that's right - by default the FTP install is set to run as FTPS thus requiring a secure connection... to turn off this feature (it was a lab environment and didn't require secure transfer) resulted in a LOT of head scratching, eventually to save time we popped open the applicationhost.config file and and added theses lines in the &amp;lt;site /&amp;gt; tag..:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&amp;lt;ftpServer&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;security&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ssl controlChannelPolicy=&amp;quot;SslAllow&amp;quot; dataChannelPolicy=&amp;quot;SslAllow&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/security&amp;gt;        &lt;br /&gt;&amp;lt;/ftpServer&amp;gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Not very elegant but served the purpose - a bit more investigation I eventually fell upon the answer using the &lt;a href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;i=1682&amp;amp;g=6" target="_blank"&gt;IIS7 Administration Pack&lt;/a&gt;, which allowed me to generate the correct script:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;c:\windows\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/sites /[name='Default Web Site'].ftpServer.security.ssl.controlChannelPolicy:&amp;quot;SslAllow&amp;quot; /[name='Default Web Site'].ftpServer.security.ssl.dataChannelPolicy:&amp;quot;SslRequire&amp;quot; /commit:apphost&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And there we go, FTP7 configured on Windows Server 2008 Core - couldn't be easier to script...&lt;/p&gt;  &lt;p&gt;- jorke&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3ac9393b-0974-4ce0-8cd3-d3ad090f85a6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Windows%20Server%202008" rel="tag"&gt;Windows Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS" rel="tag"&gt;IIS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/FTP" rel="tag"&gt;FTP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/FTP7" rel="tag"&gt;FTP7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Server%20Core" rel="tag"&gt;Server Core&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3080692" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jorke/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/jorke/archive/tags/Hosting/default.aspx">Hosting</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/jorke/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jorke/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.technet.com/jorke/archive/tags/Infrastructure/default.aspx">Infrastructure</category><category domain="http://blogs.technet.com/jorke/archive/tags/core/default.aspx">core</category><category domain="http://blogs.technet.com/jorke/archive/tags/FTP/default.aspx">FTP</category></item></channel></rss>