I have an application running on an Ubuntu 16.04 VM running
Tomcat in Azure. The application uses MySQL.
I am trying to implement https using self certification.
- I followed the tutorial:
https://www.digitalocean.com/community/tutorials/how-to-encrypt-tomcat-8-connections-with-apache-or-nginx-on-ubuntu-16-04
selecting the Apache option, and installing Apache web server according to Step 1 in the 'this guide' link in the tutorial.
- I set the ServerName in the apache2.conf file is set to the ip of the server.
- I have Tomcat manager installed.
- The only connector defined in the Tomcat8 server.xml file is:
<connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort=8443" />
- authbind is set to True
- Ports 80 and 443 is enabled in the Azure VM firewall
- In a accordance with the tutorial I set up the 'ufw' rules, although this could be disabled.
In accordance with the tutorial I then tried to navigate to the
http://server_ip, but the Tomcat 'It works' page was displayed rather than the suggested 'Apache2 Ubuntu default page'. Assuming that this was to do with having Tomcat manager installed I blindly carried on with the installation...
- I followed the 'self-signed SSL guide for Apache' in the tutorial, setting ServerName to IP address.
- Trying to navigate to
https://server_ip I get the error 'Site can't be reached - The connection was reset' as in the attached screen shot.
Carrying on the tutorial to restrict access to Tomcat installation ....
- Modified server.xml to:
<connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
address="127.0.0.1"
redirectPort=8443" />
<connector port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
address="127.0.0.1"
redirectPort=8443" />
Now I get the error message 'Site can't be reached - The connection was reset' when trying to access the site with http or https.
Please, can anyone help, I have spent two days trying to resolve this problem.
Thank you!