There is a strange problem today:
Tomcat cannot bind port 80.
I changed itconf/server.xml
File, which will be the default8080
Change to80
, and then restart. Since my Tomcat is installed by myself, it is notapt-get
andyum
, so you can work in this way. Not yet.
At first, I thought that the port was occupied, so I unloaded MySQL and restarted tomcat, but it still didn’t work.
And then I remembernetstat -an
Check the port usage and find that Tomcat is started, but port 80 is not.
As a result, stack overflow and Google seem to be very unstable today. They are always 522, and they are probably DDoS…
Try authbind [CentOS needs to download the RPM package from Yum and install it, but it doesn’t work in the source].
One particularly important thing was discovered later:
Under Linux, root permission is required to bind ports below 1024!
Meow egg, use sudo to start Tomcat. After that, the binding is successful and the website can be visited normally.