Fixed Apache port number occupation in xmapp of Apache cannot start properly
- 2020-06-03 09:07:15
After installing xmapp, friends find that Apache cannot be turned on normally. Solutions for different situations are given below, which can be divided into the following situations:
(1) Whether xmapp has been installed before this installation (no, please skip it)
Has been installed xmapp before the installation, although the uninstalled, but there will be unloaded without clean, uninstall it is best to use the program itself when own uninstaller (namely running uninstall. exe to unload), it is best not to use the uninstall feature in the control panel, uninstall after 1 set don't forget to check whether they have been deleted in the registry, the registry view mode:
1. Press win +R on the keyboard to pop up the "Run" window.
2. Enter regedit and click OK to enter the registry.
3. Follow the directory structure to HKEY_LOCAL_MACHINE\ CurrentControlSet\Services\ xmapp and MySQL under HKEY_LOCAL_MACHINE\ CurrentControlSet\Services\ and delete if you installed MySQL at the same time.
4. Restart the computer and reinstall it.
(2) Windows7 Install xmapp (you can also use this method above Win8 without looking ahead)
After Windows7 installs xmapp, if Apache fails to start properly, you only need to directly modify the file related to Apache (i.e. modify the preset port number value in the file). Follow the following steps:
1. Modify httpd.conf file. Open the file in/xampp apache/conf extra/httpd conf location (xmapp installation directory), modify the file is in order to solve the problem of port 80 to take up, put the file Listen 80 changed to 89 (can be customized for other values, as long as the modified port is not being used). If vhosts is configured, change the port in ES55en-ES56en.conf to 89 (keep 1 to the 89 port number in the httpd.conf file)
2. Modify the httpd-ES63en.conf file. Open the file in/xampp/apache/conf extra/http - ssl. conf location (xmapp installation directory), modify the file is in order to solve the problem of port 443 to take up, put the file Listen 443 changed to 444 (can be customized for other values, as long as the modified port is not being used)
(3) Windows8 and Windows10 system installation xmapp
For Win8 and Win10 systems, the 80 port number will be occupied by the system itself, in which case, in addition to directly modifying the port number (solution 1), you can actually do this:
1. Press win +R on the keyboard to pop up the "Run" window and enter cmd to enter the DOS window.
2. Enter netstat-aon | findstr :80 and enter.
3. Check the value of PID corresponding to port 80, and find that there is still one system process, and kill cannot be directly used.
4. Open the registry (same as above) and follow the directory structure to find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP
5. Find the item Start in the right column, click and select it, and then right-click to find "Modify", and change "numerical data" and "3" to "0".
6. Then shut down and restart again, and the System process will not use port 80.
7. After the restart, start Apache again and you will see Running. It has been successfully started.
Caveat: Since there are many unknown compatibility issues with Win10, there is no guarantee that everyone will be exactly the same. May reference material: Mo Yangzi (has the picture board)!
Share: cmd command line under the query port number and PID way
netstat-ano: Check the occupied port, note down the corresponding PID for the port, then open the task manager, find the corresponding PID, end the process, if the end does not work or does not work after the end, use ntsd command.
ntsd-c ES135en-ES137en: Here PID is the PID of the process to be terminated, then open the task manager, find the corresponding PID, and end the process. (The -ES141en parameter indicates that it must be followed by the PID value, and -ES143en q indicates that the debug command to exit Ntsd is executed)
tasklist: Lists all processes and corresponding information, and tskill can kill processes by PID (process ID) process name, etc.