Skip to main content
Tedmund Hurlbut
Participating Frequently
Sep 5, 2024 10:20 AM UTC

WEBSVC using a port and SSL

I have developed a website using WEBSVC and port 8180.  After much trial and error, I have it working and continue to add to the site.  Now I am trying to get SSL (https) working.  Apache is serving my login page (does not use WEBSVC and port 8180).  When the user logs in, now WEBSVC comes into action.  Since WEBSVC is running, it starts a phantom that servers 8180.  From the $COMO file, this is what I am getting when trying to connect.

$COMO PH173_050924_095317
4 line(s)
----: P
0001: COMO file activated to PH173_050924_095317
0002: Phantom 173 started at 09:53:17  05 SEP 2024
0003: HTTP/1.1 500 Internal server error 1 [7013, 2]
0004: Phantom 173 terminated at 09:53:47  5 SEP 2024
Bottom at line 4

This is how I am initially starting the WEBSVC phantom.

PHANTOM WEBSVC S.WEBSVC-14 DEBUGGING PORT 8180

Is there something I need to do to now tell WEBSVC that https is being used?

Thanks for any ideas or help,

Ted Hurlbut



------------------------------
Tedmund Hurlbut
Self Registered
Simpsonville SC US
------------------------------

    11 replies

    Tedmund Hurlbut
    Participating Frequently
    Sep 13, 2024 10:10 AM UTC

    Sorry for the late reply, I have been traveling.

    The solution to your problem if you wish to have ssl to OpenQM (or any other web server without https) is to establish a reverse proxy, the proxy service will serve up your https and proxy your requests to your http server.  You can do this on the same box as QM and reverse proxy via localhost:8180 which is internally secure.  You can also do this within your datacenter from another box.  This is not a redirection, the proxy server takes the initial request (and handles https) and then does it's own call to the next server, the response is then returned to the proxy server and back via https to the client.  This is a very common process and there are many tools to do this (most free).

    Overall explanation: What is the difference between proxy and reverse proxy? (designgurus.io)

    Apache Docs: Reverse Proxy Guide - Apache HTTP Server Version 2.4

    Nginx Docs: NGINX Reverse Proxy | NGINX Documentation

    IIS: Reverse Proxy with URL Rewrite v2 and Application Request Routing | Microsoft Learn

    You will have to read up on that platforms rules and exactly how you wish to configure this.  Most of the time we are exposing api endpoints and I typically specifiy a URL such as /api and redirect that to my Qm/jBASE/Universe/etc box.  Keep in mind the MV box will think the call is coming from the proxy device and all these tools have options to add additional headers to get the original client information.

    In addition, all of these tools have excellent https support including automated LetsEncrypt cert management.  If you are in AWS or Azure they offer similiar tools.

    If you are calling your api endpoints from a server language such as PHP or Python then the https is to that server and that server which should be inside your server datacenter can make http calls to your MV server if your security model allows it.  If you must have https even internally then putting Apache/IIS/Nginx/Haproxy on your MV server and then follow the above rules.  If you are exposing your MV server directly to the internet I then highly recommend you look at api gateways such as Kong or azure/aws api gateways to assist in protecting your endpoints.  

    GitHub - Kong/kong: 🦍 The Cloud-Native API Gateway and AI Gateway.



    ------------------------------
    Patrick Payne
    Chief Software Architect
    Rocket Internal - All Brands
    ------------------------------

    Patrick,

    Thank you for the update.  See my post to Brian.  I need someone to say definitely that WEBSVC cannot handle SSL.  Then I will need to continue with another option.

    Thanks,

    Ted



    ------------------------------
    Tedmund Hurlbut
    Self Registered
    Simpsonville SC US
    ------------------------------