The failure to start apache is mainly caused by port 80. Next, let's take a look at the solutions for ports being occupied.
Solution: 1: run netstat-ano in dos
2: In the xampp control panel, click setup to open the command interface,
3: Select 6 enable mob_perl.
4: restart xampp and run http: // localhost.
The third case is the problems encountered by some online users:
An error occurred while binding to the port. The port is not bound to the required port.
You can follow the prompts in error. log to exit the port-consuming program, so that apache can be enabled.
However, starting those programs may cause errors.
Solution:
You can run the cmd command line to check whether the program occupies the port.
1. Run cmd, enter netstat-ano, and press enter;
2. Check the last pid of the line containing the port in the first line, which is a few numbers. Write down these numbers;
3. Start "task manager"> "process" and check the box before "toolbar"> "Select Column;
4. Find the program corresponding to the pid, and it is easy to find that it is bound to the port (bind );
Reason why sub-station ports are occupied
In windows, apache cannot be started normally due to xampp.
One case is that the port number is occupied.
The default port number of iis, thunder, and other tools is 80, which is the same as that of apache.
Solution: In this case, you can modify the port number in the httpd. conf file in the apache/conf/directory to start apache normally.
There are two places to modify
1: # listen 0.0.0.0: 80
# Listen [:]: 80
Listen 80
2: servername localhost: 80
The second case is my problem.
Tools such as iis and Thunder are not started, but apache cannot be started. Other integrated xampp tools such as mysql tutorials can be enabled normally.