Home  >  Article  >  Operation and Maintenance  >  Solution to Centos httpd startup failure

Solution to Centos httpd startup failure

angryTom
angryTomOriginal
2020-03-17 13:48:066775browse

Solution to Centos httpd startup failure

Solution to Centos httpd startup failure

1. First, start the httpd service normally and see what errors occur.

service httpd start

Solution to Centos httpd startup failure

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

Solution to Centos httpd startup failure

Execute (recommended learning: navicat tutorial)

semanage port -l|grep http命令

微信截图_2020031713214Solution to Centos httpd startup failure

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

Solution to Centos httpd startup failure

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn