Local computer cannot start Apache fault handling

Source: Internet
Author: User
After WMAP is installed, it cannot run successfully. Then we found that Apache has never been running. Go to the Apache option in WMAP to select start but cannot start. Below are some ideas and methods to solve this problem. Apache

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

However, as described in the textbook, after WMAP is installed, it cannot run successfully. Then we found that Apache has never been running. Go to the Apache option in WMAP to select start but cannot start.

After being pointed out by some experts, the following possibility is concluded that Apache cannot be started:

Possible Scenario 1:

The path for installing Apache2 cannot contain Chinese characters.

Case 2:

When Apache is restarted, an error message is displayed, indicating "The requested operation has failed! "Then open the service, start Apache2, and prompt me:
"Windows cannot start Apache2. ..... on the local computer and refer to the specific service error code 1"
Solution: modify the httpd. conf file in the \ conf \ httpd. conf Directory of the Apache installation directory.
# Change this to Listen on specific IP addresses as shown below
# Prevent Apache from glomming onto all bound IP addresses.
#
# Listen 12.34.56.78: 80
Listen 80
Change port 80 to 81 or another one,
After modification,
# Listen 12.34.56.78: 81080
Listen 8080.
Restart ApacheServices.
Maybe, this method may have different solutions for different versions of Apache, I used the apache_2.2.11-win32-x86-no_ssl.msi version in the configuration, I am not very clear about other versions, is it like this change, here, I will share my joy after solving the problem!

Case 3:

Due to the busy hours, PHP is rarely used. but today I suddenly think of several calendar-related PHP programs I wrote at school and want to improve them. so I started Apache from the service but warned me:
"Windows cannot start apache2 on a local computer. For more information, see System event logs. If this is a non-Microsoft service, contact the service provider and refer to service error code 1 ."
I tried it several times and started MYSQL again, but it was able to start. why cannot I start Apache? It seems that httpd was modified last time. conf file. at that time, I only changed "AddCharset GB2312" to "AddDefaultCharset GB2312" because my PHP programs cannot obtain Chinese characters in the URL. so I thought there was a problem here, so I changed it to "AddDefaultCharset GB2312" at that time, so I thought it would not work to verify it next time, so I didn't start Apache, this problem still exists when it is started today. change to the original "AddCharset GB2312" and start again! But it can be started successfully! It seems that this character is incorrect!

Case 4:

When thunder is enabled, Thunder occupies port 80 by default. Close Thunder and restart Apache!

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.