Andy Jarrett // Code. Develop. Create.

Get webserver IP address with ColdFusion

I needed to get the IP address from the server running ColdFusion today. Immediately I <cfdump>'d the CGI variables but that only gives you the HTTP_HOST. So with no luck there I turned to Google, ColdFusion plus Java and I finally managed to get the info with the following:#inet.getLocalHost()#Hat tip to Peter Freitag's blog post for pointing me in the right direction too.

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️