Bilal-S / iis2tomcat

AJP Connector between Internet Information Services (IIS) and Apache Tomcat
http://www.boncode.net/boncode-connector
49 stars 32 forks source link

Lucee 4.5 with IIS7 on Windows2008R2: REST service #73

Closed charlesr1971 closed 6 years ago

charlesr1971 commented 6 years ago

When I try and make a REST request. I get a 404 response.

The REST Service is being correctly initialised, as it responds correctly via localhost:8888.

My Boncode Handler is installed into IIS at a global level:

<add name="BonCode-Tomcat-Rest-Handler" path="/rest/*" verb="*" type="BonCodeIIS.BonCodeCallHandler, BonCodeIIS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad590a40d40745cf" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
charlesr1971 commented 6 years ago

img_0353

charlesr1971 commented 6 years ago

The Lucee REST mapping is as follows:

<mapping default="false" physical="C:\domains\establishmindfulness.com\wwwroot\com\api\v1" virtual="/api.establishmindfulness"/>
Bilal-S commented 6 years ago

It looks like it already but please verify that your requests do not require a file or folder in your handler deceleration. mapping request restrictions

If so this may be coming from Tomcat directly. Turn of <EnableHTTPStatusCodes>False</EnableHTTPStatusCodes> to see what tomcat is not liking.

charlesr1971 commented 6 years ago

Hi Bilal. Thanks for the response. Yes. I have that panel unchecked. But I think it is set to 'File or Folder'. I have actually tried all 3 options, checked & unchecked.

Do, I set

EnableHTTPStatusCodes

in web.xml?

charlesr1971 commented 6 years ago

The weird thing is, that my other 3 Boncode Handlers work as expected for:

*.cfc *.cfm *.cfml

And the 'cfc' one, I set, manually, after I installed Lucee4.5.exe So, this proves that setting them manually, should work. It looks like Tomcat isn't handing over the URI to Lucee, so that the latter can translate the serverMapping to the physical path?

Bilal-S commented 6 years ago

EnableHTTPStatusCodes is a BonCode setting. It needs to go to the BonCodeAJP13.settings file. For global installs the file is located in c:\windows (your system path)

As far as handler you can try *.* rather than * it seems to make a difference sometimes.

Bilal-S commented 6 years ago

closing