The requested operation has failed solution when apache2.4 starts

The requested operation has failed solution when apache2.4 starts

Installed the Apache server today. After the installation is complete, I want to turn on the server, and the result is "the requested operation has failed". On the Internet, I found that the above has the following reasons

Reason 1 : Port 80 is occupied, such as IIS

Reason two : httpd.conf configuration error If the apache configuration file httpd.conf is wrong, start it in windows, it will prompt the requested operation has failed. In fact, you can start apache in command line mode with parameters, apache will prompt you which sentence is wrong, and then you can solve it in a targeted manner.

Check the error method: enter cmd and then enter the Apache installation directory (specifically your own installation directory)\bin> enter the command line

httpd.exe -w -n "Apache2.4" -k start
(The Apache2.4 in the quotation marks is modified to your Apache service name, mine is version 2.4.46, the service name is Apache2.4, you can find it in the computer service)

My problem is when I enter the above command line: " (OS 10048) Usually each socket address (protocol/network address/port) is only allowed to be used once:
make_sock: could not bind to address 0.0.0.0:80... "
Error

solution:

1)由于服务器的80端口被占用引起的,如果是windows的话就是IIS,停掉Default Web Site就可以了;
(2)将httpd.conf中的Listen 80行改为  Listen 88,换一个端口
(3)将httpd.conf中的Listen 80行改为  Listen 127.0.0.1:80

Guess you like

Origin blog.csdn.net/weixin_49092628/article/details/114794468