Solution to Centos httpd startup failure
1. First, start the httpd service normally and see what errors occur.
service httpd start
2. If "address already in use" appears, we need to modify our port. In the picture above, port 88 cannot be bound, and we need to do it again. Modify the port number and execute:
vi /etc/httpd/conf/httpd.conf
Execute (recommended learning: navicat tutorial)
semanage port -l|grep http命令
3. The port number that appears in the picture is the port number that can be bound. That is to say, the port number at line 42 can be changed to the port number in the red circle. If there is a conflict with 80, it can be changed to 81. Of course, we can also increase the port number. , now execute the command
semanage port -a -t http_port_t -p tcp 888 #增加这个888非标准端口即可
. After execution, we can change the port 888 in line 42.
4. Finally, start the httpd service again and it starts successfully!
service httpd start
This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!
The above is the detailed content of Solution to Centos httpd startup failure. For more information, please follow other related articles on the PHP Chinese website!