Apache2.2 cannot be started because port 80 is occupied by system PID 4.

Source: Internet
Author: User

Install and configure apache2.2. After the installation is complete, enter 127.0.0.1: 80. Open failed. Port 80 is disabled. First, check whether the IIS service port is 80. This service is not started (Manual ), some software may also occupy port 80.
Finally, run netstat-ano on the command line and find that port 80 is occupied. The occupied PID is 4 and its name is system.
Solution:
1. Open the registry in the running window and enter regedit
2. Open HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ HTTP as follows:
3. Find an item named "start" and its type is "REG_DWORD". Right-click "modify" and change its value to 0. Click "OK" to save the modification.
4. restart the system. The system process does not occupy port 80.
Test:
Enter 127.0.0.1 to display "It works !", Configuration successful!
Note: Or when you start the computer again, port 80 will be occupied by system. In this case, set the HTTP folder permission of the Start item to "system!

You cannot kill the system process with PID = 4. The following is a further explanation:

This process is HTTP. sys. It is the driving component of http api and the HTTP stack server. If the port is occupied by HTTP. sys, some applications that are using HTTP. sys are running. This is why Apache is blocked because HTTP. sys occupies port 80. We provide an application mechanism to help control port sharing, but I need to investigate what special applications cause this difficulty. If you can provide the output result of the "netsh HTTP show servicestate" command, I can find out which application is using HTTP. sys. Before you disable HTTP. sys, follow these steps to run the command:

1. SC config HTTP stat = demand powerbet

2. Reboot

3. Run the command (netsh HTTP show servicestat) as Administrator

Before using this command, you can disable HTTP. sys as follows:

1. net stop HTTP

2. SC config HTTP start = disabled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.