vendredi 31 janvier 2020

Failed to connect to Tomcat 9 on CentOS 8

Apache Tomcat 9 on CentOS 8 is running well, but I can not connect to it by curl.

Before I change the HTTP&HTTPS port of Tomcat, I can access it successfully.

The same is true on Ubuntu 18.04 LTS.

I uses OpenJDK 13.

$ sudo firewall --zone=public --add-port=80/tcp --permanent
success
$ sudo firewall --reload
success

Then

$ curl http://localhost:80
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused

Why? Need I use "semanage"?

server.xml (now)

<Connector port="80" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="443" />

server.xml (before the change)

<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />



Aucun commentaire:

Enregistrer un commentaire