Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
MikeB36 #1
Get IP Addr or Hostname of CF server
Hello,
I need to write some ColdFusion code that will do things a little differently
based on what ColdFusion server it is running on. Is there any way in
ColdFusion you can get the IP address or host name of the ColdFusion server?
As long as it doesn't return 127.0.0.1 and localhost ... that wouldn't be very
useful.
Thanks
MikeB36 Guest
-
outputing field with spaces in name (bus addr)inmsaccess
how to form the output for a field with a space in the name. Using MSAccess. <cfoutput> #members.# </cfoutput>doesn't work. Neither did about 5... -
ip addr changes on 5.3 but not on 4.8
I'm running both 4.8 and 5.3 on two different boxes in my office. Both have specified in rc.conf their hostname and default router (a win xp box... -
Identify dhcp client to server using hostname
I am trying to allocate ip-addresses on my local network using dhcp3-server. I want a couple of systems to have a fixed address, while other system... -
Site without link-bar and addr.-bar.
"pejs" webforumsuser@macromedia.com wrote: I assume you mean the browser's default bars, and not something within your pages? If so, you... -
Sendmail 8.9.3 - need to remove hostname from @hostname.domain.com
I just upgraded from 432 to 433. Along with this came Sendmail8.9.3. I have changed the new sendmail.cf file with the same changes as the previous... -
philh #2
Re: Get IP Addr or Hostname of CF server
I take it cgi.server_name doesn't help you?
philh Guest
-
Joseph Gooch #3
Re: Get IP Addr or Hostname of CF server
I just write the server name to a file called real.html in the root of
the web site. It helps with the load balancer, since then I can tell
remotely which server I'm actually on, and then in code I can use cffile
to pull the data into a variable for my error handler and conditional code.
If I wanted to be real tricky I'd have my onApplicationStart methods
check the server scope to make sure a variable exists there with the
contents of real.html so it's always available.
I haven't yet figured out if it's possible to initialize variables in
the server scope via a jrun or CF config file, or to have jrun/cf run a
function/cfm/class at startup. (which would be ideal)
Joe
MikeB36 wrote:> Hello,
>
> I need to write some ColdFusion code that will do things a little differently
> based on what ColdFusion server it is running on. Is there any way in
> ColdFusion you can get the IP address or host name of the ColdFusion server?
> As long as it doesn't return 127.0.0.1 and localhost ... that wouldn't be very
> useful.
>
> Thanks
>Joseph Gooch Guest



Reply With Quote

