Home > Article > Backend Development > Apache cannot start, start Apache_PHP tutorial
I am a front-end developer, and I am not very familiar with background programs. I have learned a little about .net before, but I have almost forgotten it now. . Recently at the company, the manager gave me a management tool called dedecms. When I first looked at it, I had no idea what it was. I had never heard of it before (I have relatively little knowledge). The manager said that he wanted me to take a good look at it, learn from it, and use it to find websites for small and medium-sized enterprises in the future, which would save time and effort.
In the first few days, I was just trying to use it. I know that definition tags are used here, and tags are used to call templates and data. But a few days ago I wanted to review the production of a .net website. Because the company's website is made of .net, I installed the ISS service on my computer, thinking that I would definitely be able to use it in the future.
Today I want to continue learning how to use DreamWeaver. I enter the address localhost/dede/ (I have not changed the name of the management directory to include the default name dede), but I can’t log in. The system shows that the address cannot be found. I opened the DedeAMPZ integrated suite server version management program and saw that my Apache service was not started and could not be started no matter how I clicked to start it. I asked Du Niang, and the answer she found was to change the port in the WEB global scalar. Port 80 was occupied. Du Niang's suggestion was that I change the port to another port 8080. I changed it and tried it, and the Apache service finally started. But when I enter the address localhost/dede/ to enter the management page, I cannot enter DEDECMS. I was anxious and searched for various suggestions on the Internet. I also changed the servername and port, but to no avail. After a while, I remembered that the Internet did not say that the port was occupied, so I wanted to try to terminate the service occupying port 80. Find on the Internet that port 80 is occupied, use the netstat -ano command to find the PID () of the program that occupies port 80, and then find the program corresponding to this PID in the task manager and end it. Finally, I found in the task manager that inetinfo.exe was occupying port 80, so I ended it happily. But Apache still didn't start. I went back to the task manager to check, and the program was automatically enabled again. I went there and felt very depressed. I remembered that it was said on the Internet that IIS uses port 80 for HTTP communication by default. I think it may be that after I installed the IIS service, IIS has been enabled. Inetinfo.exe is because the IIS service has been enabled so it cannot be turned off. I found the service, closed the IIS Admin service, and re-enabled the Apache service. Then enter localhost/dede/ in the URL, and finally see the login interface of DreamWeaver.
The Apache installation directory must not contain spaces, that is to say, it must not be installed in the Program Files directory to prevent it from running if you need to add commands to the Apache configuration in the future.
You installed Apache in D:/program files, and there is a subdirectory under the program files directory that also contains spaces. Of course, an error message will appear when starting.
It is recommended that you create a general directory for building a php environment in the D drive, such as D:/PHPweb, and then create the Apache installation directory directly in this directory, such as D:\PHPweb\Apache2.2, so that it will not An error message indicating that it cannot be started appears.
Try uninstalling Apache in the correct way and then reinstalling it
If the apache configuration file httpd.conf is wrong and you start it in Windows, you will be prompted that the requested operation has failed. This is quite depressing because it takes a long time to check the error. In fact, you can use the command line mode to start apache and bring the parameters. Apache will prompt you which sentence is wrong, and then you can solve it accordingly. The command is as follows:
httpd.exe -w -n "Apache2" -k start