
上QQ阅读APP看书,第一时间看更新
Enabling the firewall and port 8080
Apache Tomcat runs on port 8080. Follow these steps to enable the firewall, if it's disabled:
- Enable the firewall using the following command:
sudo ufw enable
- Allow traffic on port 8080:
sudo ufw allow 8080
- Enable OpenSSH to allow SSH connections using the following command:
sudo ufw enable "OpenSSH"
- Check the firewall status using the following command:
sudo ufw status
- You should see the following output:
Status: active To Action From -- ------ ---- 8080 ALLOW Anywhere OpenSSH ALLOW Anywhere 8080 (v6) ALLOW Anywhere (v6) OpenSSH (v6) ALLOW Anywhere (v6)
- You should now be able to access the Apache Tomcat server page at http://<IP address of the Apache Tomcat>:8080.