I am trying to get Tomcat to work on port 80 & 443 with an SSL certificate. When tomcat first starts I can connect on port 8080 and everything looks great.
After that I modified the two lines in server.xml file to look like below
<Connector SSLEnabled="true" protocol="org.apache.coyote.http11.Http11NioProtocol"
clientAuth="false" port="443" scheme="https" secure="true"
sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"
keystoreFile="/opt/tomcat/certificates/CERTIFICATE.pfx"
keystorePass="PASSWORD"
keystoreType="PKCS12" />
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443"/>
After this I installed authbind and did the whole process with authbind and added authbind --deep to the tomcat start script.
Restart tomcat and it starts with no erros
querying netstat shows that 80 and 443 are listening
tcp6 0 0 :::443 :::* LISTEN 17181/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 17181/java
tcp6 0 0 :::8009 :::* LISTEN 17181/java
tcp6 0 0 :::80 :::* LISTEN 17181/java
when I try to curl localhost I get a connection refused error.
curl localhost
curl: (7) Failed to connect to localhost port 80: Connection refused
If I revert back to 8080 everything works fine. I have been scratching my head over this for hours. Please help me