Apache cannot start cause

Source: Internet
Author: User

Apache cannot start the solution

Author's words: When encountered this problem, from the Internet to find a lot of information, the result is to let me this novice can not touch the clue

Fortunately, in my long time to find, or found an article, to solve my troubles, here are some of my comments on this article on the novice, and added some of their own understanding.

Behind the article is the original source of the article

Apache does not start when it is installed

Reason one: 80 port occupancy such as IIS, the other is Thunderbolt.

Enter cmd input command Netstat-ano

From the command line, you can see whether port 80 is occupied

reason two: software conflicts loaded with certain software will make Apache unable to boot such as dr.com

You open the network connection->TCPIP properties, Advanced->wins tab remove the NetBIOS Lmhosts, disable the NetBIOS of TCP/IP. And then start again should be ready.

Win10 Entry Method Control Panel---Network connection----Ethernet Properties

The Tcp/ipv4 Property-----Advanced-----WINS------Disables NetBIOS for TCP/IP.

Reason three: httpd.conf configuration error

Configuration file directory Apache installation directory \conf\httpd.conf

If Apache configuration file httpd.conf wrong, start it in Windows, will prompt the requested operation has failed, this is more depressed thing, because the wrong to see a half day. In fact, you can start Apache with command-line mode, and with parameters, Apache will prompt you which sentence is wrong, and then can be targeted to solve.

Check the error method: Go to cmd and enter the Apache installation directory (specifically your own installation directory) \bin> httpd.exe-w-N "Apache2"-K Start

The Apache2 in quotation marks is modified to your Apache service name

How to find:

Control Panel-------System and security--------management tools---------Services

This is the name of my Apache, and the other may be a similar name

Tip 133 When there is a problem (hint: Syntax error on the line 133 of ...), open the Apache installation directory \conf\httpd.conf find the 133th row of serveradmin ( There is no tool to determine the number of rows by ctrl+f with "ServerAdmin" keyword search, generally there will be two, the following is the line in the next empty a lattice, add a name, for example, add ABC, can be solved.


If this is a port occupancy (hint: (OS 10048) It is usually allowed only once per socket address (Protocol/network address/port). ), first exit Apache, search for Listen 80 in httpd.conf, change 80 to 8080 or another port number, rerun Apache, this should be able to start.

The above is generally unable to start the use of methods, come out for a similar problem of friends reference. I hope it helps.


If the site root settings are not correct will not start, Apache is really a lot. There are two places. Find Apache/htdocs in httpd.conf. Modify, such as K:/iddcweb/wwwroot
The general file address of "\" in Apache to change to "/".

If you are using the Apache2.24 version, select the Php5apache2_2.dll load in PHP.

Apache cannot start after installing PHP

The reason is that some PHP features and Apache conflicts

Re-run the PHP installation file, select the first item, reconfigure

There is no guarantee that there is a reason for the error, so choose a few of the features you need

Modify some settings for httpd.conf

1. Change the website root directory, there are two places. Find DocumentRoot and Directory. Modify, such as D:/wwwroot, mainly the general file address of the "\" in Apache to change to "/".

2. Home settings, DirectoryIndex, add related home items can, such as index.php ihdex.htm


3. Find LoadModule SSL, add two lines below, the first line "LoadModule Php5_moduled:/server/php/php5apache2_2.dll" means to load PHP in module mode, the second line " Phpinidir "d:/php" is the location of the PHP configuration file php.ini, and of course, the "d:/php" is changed to the directory of the PHP decompression you selected earlier.

4. Locate Addtypeapplication/x-gzip. GZ tgz, and add "addtypeapplication/x-httpd-php. php", "addtypeapplication/x-httpd-php" below. . html "Two lines, you can also add more, the essence is to be added can execute PHP file type, such as you plus a line" AddType application/x-httpd-php. htm ", The. htm file can also execute a PHP program, and you can even add a previous line of "AddType application/x-httpd-php. txt" to allow normal text file formats to run PHP programs.

5. Search ServerName Modify the port after the name of the website as the port that was changed, if not changed, omit.

Reference article: http://www.cnblogs.com/bluechilli/archive/2010/07/27/1786480.html

Http://www.linuxidc.com/Linux/2010-05/26203.htm

Apache cannot start cause

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.