Configuring %CSP.REST for SSL connections
I have an Ensemble installation and just build my first RestService (using %CSP.Rest that forwards them to my Business Service). This works nice and fine when I use postman to make REST calls over http (port 57772). However when I attempt to make a request using https over port 443 I receive the following error:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html> <head> <title>404 Not Found</title> </head> <body> <h1>Not Found</h1> <p>The requested URL /csp/healthshare/fcoffice/rest/ping was not found on this server.</p> <hr> <address>Apache/2.4.18 (Ubuntu) Server at <MyUrl.Com> Port 443</address> </body> </html>
Now I have an Apache Web Server running that handles SSL calls for my soap calls that go to /csp/healthshare/fcoffice/services/... which is working nice and fine. So I am guessing that either the Apache Web Server, the CSP gateway or my Ensemble Web Application (which dispatches the url to the %CSP.REST class) that is misconfigured. However, insofar I have been unsuccessful in figuring out anything wrong with any of these configurations. Where should I look?
I found this in the apache2.conf of my apache directory:
<Directory "/home/ubuntu/intersystems/fcoffice/csp"> CSPFileTypes csp cls zen cxw AllowOverride None Options MultiViews FollowSymLinks ExecCGI Require all granted <FilesMatch "\.(log|ini|pid|exe)$"> Require all denied </FilesMatch> </Directory>
I guess I somehow need to apply urls. Any suggestion how?
Thanks to the comment the following code was the answer:
<Directory "/home/ubuntu/intersystems/fcoffice/csp/healthshare/fcoffice/rest">
CSP On
SetHandler csp-handler-sa
</Directory>
<Directory "/home/ubuntu/intersystems/fcoffice/csp">
CSPFileTypes csp cls
AllowOverride None
Options MultiViews FollowSymLinks ExecCGI
Require all granted
<FilesMatch "\.(log|ini|pid|exe)$">
Require all denied
</FilesMatch>
</Directory>