Please can you help. I have created in Java a Rest API and exported the WAR file to my cloud Tomcat 8 server. I have been able to access and use it fine in my Codenameone app for months, using http://www.mydomain.co.uk:8080/MyProject/...
But i have now applied TLS\SSL to my server (purchased a Comodo certificate) and now, using my app or Postman get a connection timeout when i use the similar URL call https://www.mydomain.co.uk/MyProject/... The identical URL pasted in my browser also gives 'Connection took too long to respond'. I have not made any changes to the Rest API project or the HTTP request headers i pass to it between the 2 calls. Why can't it be read now?
Disabling the firewall makes no difference. Using 443 ports makes no difference and using 8443 gives a 'Could not get any response' in postman.
I have my 3rd party certificate correctly installed. I know this because in my browser if i run just "https://www.mydomain.co.uk/MyProject" (no port) it downloads the WAR file. I can also view a test GIF file "https://www.mydomain.co.uk/test.gif" which is in my Tomcats /usr/share correctly, and the browser shows 'Secure' and i can see the correct certificate is being used. So i don't think this is a Tomcat ports/firewall problem or a certificate problem. As my browser can download the WAR file using the same 1st half of the URL, then that must mean the location of the war file is OK.
It seems to be something around the actual calling of the Rest API which, as i said, works fine if i do "http://www.mydomain.co.uk:8080/MyProject/..."
Almost seems to be the way that Postman or the app calls the API. FYI, my only relevant request header i am passing it 'Content-Type' = 'application/json'. Many thanks
UPDATE 20/05/18 Current position: When i issue the URL call to my rest api "https://www.mydomain.co.uk/MyProject/some_path_params" (which works fine using http and 8080) i get a '404 Not Found' in all calling places (eg. Postman).
Looking at the apache2 error.log it says 'AH00128: File does not exist: /var/lib/tomcat8/webapps/MyProject/some_path_params'. This is correct in that the files don't exist, but this is because the endpoint is MyProject.
Does anyone know why it is trying to find the file represented in the URL, instead of calling the rest API and going into the java class that starts with '@Path("/some_path_params")' ?
Why won't Postman just run the Rest API when in https mode?
If I enter https://www.mydomain.co.uk/MyProject, it does display the file structure, so I do have access to that directory.
BTW, when i restart the apache2, the logs confirm the TLS certificate is loaded correctly.
If it's relevant, i have included this in the web.xml of the Java project:
<security-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
My apache.conf has these sections:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/mydomain_co_uk.crt
SSLCertificateKeyFile /etc/ssl/private/www.mydomain.co.uk.key
SSLCertificateChainFile /etc/ssl/certs/mydomain_co_uk.ca-bundle
ServerName www.mydomain.co.uk
Alias /MyProject "/var/lib/tomcat8/webapps/MyProject"
<Location />
Require all granted
</Location>
Finally solved the problem after 2 weeks of tweaking. My solution is against this call