The local computer cannot start Apache troubleshooting and apache troubleshooting

Source: Internet
Author: User
Tags apache tomcat

The local computer cannot start Apache troubleshooting and apache troubleshooting

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!


The following message is displayed when you start Apache on windows as a service: "windows cannot start Apache on a local computer.

It may be because the listening port of Apache conflicts with other software. This is a common mistake for new users. While IIS server is installed in Windows, Apache server is installed, both server software listen to port 80 of the TCP/IP protocol, so one of them cannot start. If you want to run both services at the same time, modify the listener port of Apache, for details about the modification method, refer to the Apache manual. For different versions, the modification method is slightly different. Generally, the httpd. conf file is modified, and port 80 is changed to another one, such as 8080.
If IIS is not installed, the system prompts that it cannot be started. That is why P2P software such as thunder is playing a strange role. To find the software, enter netstat-o-an in the command line window.
The Local Address column is displayed as follows:
0.0.0.0: 135
0.0.0.0: 445
0.0.0.0: 1688
0.0.0.0: 8100
0.0.0.0: 16368
10.10.10.1: 139
127.0.0.1: 1032
...
Find the process that occupies port 80, find its process PId in the Pid column, find it in the task manager, or end the process.
 
Windows cannot start Apache tomcat 6 on a local computer

Uninstall and install it again. It may be firewall or other software. Your service is banned.

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.