• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Publish Rest Service with Domain on IIS

Community Beginner ,
Feb 04, 2024 Feb 04, 2024

Copy link to clipboard

Copied

I have written, published and tested a web service in ColdFusion. I have a test server running on port 8500. I have a production server running on port 8028. I have the IIS connector installed as well.

 

My question is in regard to making my REST service available on the Internet. My ColdFusion Server is on AWS, everything works fine on localhost/127.0.0.1 with on port:8028 

 

So, as an example, my Rest service is running happily on: mymachine:8028/myrestservice/{argument_variable1}-{argument_variable2} 

 

Now, I want to expose it (I have the domain) on subdomain.mydomain.com.au/somepath_or_paths/{argument_variable1}-{argument_variable2} 

 

Can someone help me out by pointing me to a resource to do this? Do I need to set up something in AWS to reverse proxy requests to my server? Thank you.

Views

240

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Feb 09, 2024 Feb 09, 2024

When you say your CF server is on AWS, I'm assuming you mean the AWS EC2 service?

If that is the case, and if you plan to continue using port 8028, you need to open that port to your EC2 instance.  This posting talks about how to do this.  Just  substitute your port 8028 everywhere it mentions port 80

 

Using this method, all those who want to use the webservice must include the port.  So, your URL would be something like:

https://subdomain.mydomain.com.au:8028/somepath_or_paths/{argument_variable1}-{argument_variable2

...

Votes

Translate

Translate
Community Beginner ,
Feb 09, 2024 Feb 09, 2024

Copy link to clipboard

Copied

I came here searching for the same answer.

I am using IIS on my development server. I am goign to try playing around with virtual directories on the IIS site and see if I can get something cobbled together.

Please update this post if you found something that works for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 12, 2024 Feb 12, 2024

Copy link to clipboard

Copied

It was kind of silly/stupid in the end. I had not run an index.cfm at the IIS webroot directory. Once I did - it can be anything dead simple as long as it is .cfm - then My web service mapping started working on port 80 (as per the CF IIS connector). You may have been like me. I started developing a Web Service with CF, and hadn't bothered with any .cfm pages. That is, I purchased CF for the first purpose of standing up the web service, did the development locally and then deployed ... I did some searching around, and I don't know where I found the suggestion, but just running the simplest .cfm page at the IIS web root resulted in my rest path mapping and my web service cfc 'just working'. So, that's it, just run the most basic of .cfm page at our web root once you have installed the IIS Connector, and then ColdFusion will suddenly run everything happily through port 80. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 09, 2024 Feb 09, 2024

Copy link to clipboard

Copied

When you say your CF server is on AWS, I'm assuming you mean the AWS EC2 service?

If that is the case, and if you plan to continue using port 8028, you need to open that port to your EC2 instance.  This posting talks about how to do this.  Just  substitute your port 8028 everywhere it mentions port 80

 

Using this method, all those who want to use the webservice must include the port.  So, your URL would be something like:

https://subdomain.mydomain.com.au:8028/somepath_or_paths/{argument_variable1}-{argument_variable2

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 12, 2024 Feb 12, 2024

Copy link to clipboard

Copied

LATEST

Thanks for the Help. As I replied above the solution turned out to be ridiculously simple. I just needed to run the simplest index.cfm page at the IIS iinetpub wwwroot level, and then ColdFusion kicked in with my mapped Rest Service path, and everything else, running perfectly on port 80. Had I put in an Application.cfc at the start, I suspect that would have done the trick as well. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation