In ColdFusion, is there a way to determine what server the code is running on?

This may help you further...

<cfscript>
machineName = createObject("java", "java.net.InetAddress").localhost.getCanonicalHostName();
hostaddress = createObject("java", "java.net.InetAddress").localhost.getHostAddress();
</cfscript>
<cfdump var="#machineName#"><br />
<cfdump var="#hostaddress#"><br />

You can use Server Variables like

server.coldfusion.appserver 
server.coldfusion.expiration    
server.coldfusion.productlevel
server.coldfusion.productname   
server.coldfusion.productversion
server.coldfusion.rootdir   
server.coldfusion.serialnumber  
server.coldfusion.supportedlocales
server.os.additionalinformation 
server.os.arch  
server.os.buildnumber   
server.os.name  
server.os.version

to tweak your code to specific platforms. Do a <cfdump var=”#SERVER#” /> to see what's applicable to your version of Coldfusion.

You can get the hostname with a Java call:

<cfscript>
machineName = createObject("java", "java.net.InetAddress").localhost.getHostName();
instanceName = createObject("java", "jrunx.kernel.JRun").getServerName();
</cfscript>