The local computer could not start Apache fault handling

  • 2021-07-10 19:08:16
  • OfStack

Recently, due to work needs, to learn the basic programming of PHP, so learn to set up PHP working environment.

However, as introduced in the textbook, after installing WMAP, 1 can't run successfully. It was found that Apache1 was not running directly. Go to the Apache option in WMAP to select Start but cannot start.

After being instructed by a high-ranking person, it is concluded that the following possibilities cannot start Apache:

Possibility 1:

The path to install Apache2 cannot contain Chinese.

Possibility 2:

Restarting Apache will pop up an error prompt box, prompting "The requested operation has failed! "Then open the service, start Apache2, and prompt me:
"Windows could not start Apache2 on the local computer...... and refer to Service Specific Error Code 1"
Solution: Mainly in the installation directory of Apache\ conf\ httpd. conf, modify httpd. conf file
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Change port 80 to 81 or something,
After being changed to,
#Listen 12.34.56.78:81080
Listen 8080
Restart ApacheServices and there will be no problems
Perhaps, this method may have different solutions for different versions of Apache. I used apache_2. 2.11-win32-x86-no_ssl. msi version when configuring. I am not very clear about other versions. Is this the way to change? Share my joy after solving the problem here!

Possibility 3:

I seldom go to PHP because I have been busy these weeks. But today, I suddenly remembered some PHP programs about calendars written at the beginning of school, and wanted to improve it, so I started Apache from the service, but there was a warning:
"windows could not start apache2 on the local computer. Consult the system event log for more information. If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 1."
Try a few times can't, then start MYSQL. But it can start successfully. Why can't you start Apache? Think about it as if I changed the httpd. conf file last time. At that time, I only changed "AddCharset GB2312" to "AddDefaultCharset GB2312" because my PHP program can't get the Chinese characters in URL. So I thought there was a problem here, so I changed it to "AddDefaultCharset GB2312" at that time. I thought I would verify it next time, so I didn't start Apache until today. I found this problem when I started it. Change back to the original "AddCharset GB2312" and start it again! But it can start successfully! It seems that there is a problem with this character setting!

Possibility 4:

Open Thunderbolt, Thunderbolt occupies 80 ports by default. Close Thunderbolt and restart Apache service!


Related articles: