Apache server cannot start viewing startup error messages

Source: Internet
Author: User

HTTPD.CONF Configuration Error
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, the command is as follows: Httpd.exe-w-n "Apache2"-K Start

You can install an Apache service in the bin subdirectory of the Apache installation directory using the following command. If you do not specify a service name and profile, use the default service name Apache2.2 at installation, the default profile conf/httpd.conf.

    1. C:\Apache2.2\bin> Httpd-k Install

When multiple Apache services are installed on the same machine, they must be assigned a different name, which makes them easy to administer. You can use the following command to specify the name of the service, where "Apacheshop" is the specified service name.

    1. C:\Apache2.2\bin> Httpd-k install-n apacheshop

If you want to specify a different configuration file for different services, you can use the following command at installation time to specify:

    1. C:\Apache2.2\bin> Httpd-k install-n
      Apacheshop-f "C:/apache2.2/conf/my.conf"

    1. C:\Apache2.2\bin> Httpd-k Uninstall

You can also remove a service with the specified name, as follows:

    1. C:\Apache2.2\bin> Httpd-k uninstall-n apacheshop

The way to start, stop, and restart the Apache service is typically using the Apache Services Monitor tool, or you can use the console command: net start Apache2.2 and net stop Apache2.2, or use the Services under Windows Control Panel.

Before you start the Apache service, you can use the following command to check the correctness of the configuration file.

    1. C:\Apache2.2\bin> Httpd-n apache2.2-t

You can also control Apache services from the command line. To start an installed service:

    1. C:\Apache2.2\bin> Httpd-k start

To stop an installed service:

    1. C:\Apache2.2\bin> Httpd-k Stop

Or

    1. C:\Apache2.2\bin> Httpd-k shutdown

To restart a running service, you can force it to reload the configuration file by using the following command:

    1. C:\Apache2.2\bin> Httpd-k restart

The httpd command is very important and is described in detail below.

      1. httpd [-D name] [-D directory] [-f file]
      2. [-C "directive"] [-C "directive"]
      3. [-W] [-K Start|restart|stop|shutdown]
      4. [-K Install|config|uninstall] [-N Service_Name]
      5. [-V] [-V] [-h] [-l] [-l] [-T] [-S]

Apache server cannot start viewing startup error messages

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.