Lucee Express on localhost and https

Hi Everyone,
I have spent the last hour searching google and the forums for an answer.
I feel that there must be the same question (and hopefully answer) somewhere that I am just not finding…

Anyway - I have installed Lucee Express.
I start it with the startup.bat
I have made no changes - but to server.xml for some *.localhost resolution for specific apps.

I have an application that talks with an external API.
The local app and the connection MUST be https/ssl or the API call returns a 403 status.

Can I please get some help / pointed in the right direction for the instructions so that I can run a localhost CFML application with https/ssl?

Thanks very much!

OS: Windows 11
Java Version: 11+28
Tomcat Version: 9.0.0.11
Lucee Version: 5.3.8.206 Express

I think you will have an easier time if you use CommandBox to spin up your server. It’s just as easy as Lucee express and far easier to configure. You can activate a self-signed cert just by doing

server set web.ssl.enable=true
server restart

Or you can configure a custom cert of your own.

However, if this is a local site and you have control over the code, I would simply modify the code that returns a 403 for testing purposes.

Thanks for the reply.
The code that returns the 403 is an external (company’s) API - so we don’t have control over their requirement of MUST use https.

I’ll look into command box to see if that solves my issue

Thanks
.

I’m a little confused-- if there is an external API that requires you to hit it over HTTPS, then this has nothing at all to do with what protocol is used to access your local server. It’s simply an HTTP request to the remote endpoint. I think you’re confused about something. If the remote endpoint requires you to use SSL when connecting to it, then do so. This has no bearing on your local server.

The issue is;
I call the API,
The API then redirects to a URL with its payload.
The API will ONLY redirect to a HTTPS endpoint.
Thus I need to configure my localhost.

Thanks.

This is a different can of worms entirely. A server bound to your localhost will not be publicly (or even just externally) accessible unless you’re using a proxy like Ngrok. But regardless, CommandBox is still your best bet as its web server allows you to configure either a self signed cert or a cert file of your choosing.