About how to start Apache2 on a local computer and how to start Apache2_PHP on a computer

Source: Internet
Author: User
The local computer cannot start Apache2, and the computer starts Apache2. About the failure of the local computer to start Apache2, the computer to start Apache2 recently due to work needs, to learn the basic programming of PHP, so learning to set up the PHP work environment. However, according to the textbooks, the local computer cannot start Apache2, and the computer starts Apache2.

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!


Windows cannot start Apache2 on a local computer. it is a windows 7 7 system.

Didn't you disable the IIS service. Right-click my computer and manage the IIS in the service. The windows7 system can run automatically without shutting down .. Is it a 64-bit system?

Windows cannot start Apache2 on a local computer

Apache-20 \ conf \ mime. types

Solution: copy the file and restart it!
 

Parse recently learned the basic programming of PHP due to work needs, so he learned how to set up the working environment of PHP. But according to the introduction in the teaching material...

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.