Installation and configuration of Apache2.4-win32 under Win7

Source: Internet
Author: User
Tags learn php

  In order to learn PHP need to build Apache server on their own PC. PC environment is Win7, because on the official website of Apache found the latest version is Apache httpd 2.3.10 released version. Slag English looking for a long while did not find Win32 installation package, only to see "TheApache HTTP Server Project itself does not provide binary releases of software, only sour CE code. Individual committers may provide binary packages as a convenience, but it's not a release deliverable. If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions Available on the Internet. " The Win32 version needs to be compiled on its own, if it is not possible to download the compiled version from the following publishers it provides. Apachehaus,apache Lounge is available. Casually down one, direct decompression can, and Apache2.2 mis installation, the service needs command line and configuration file configuration. The process is not very responsible, there are a lot of tutorials on the web, now organized as follows.

    1. Download Apache2.4, available for http://apache.fayea.com//httpd/binaries/win32/in several links given under downloading Apache for Windows. Unzip after download. such as decompression to D:\Acpache24.
    2. Open the httpd.conf file under apache24\conf and open it with Notepad:

(1) The 37th line ServerRoot "C:/apache24" to ServerRoot "D:/apache24";//apache the location of the program.

(2) The No. 204 line of the serveradmin change does not matter;

(3) The "#" in the front of the No. 213 line servername is removed;

(4) The No. 237 line DocumentRoot "C:/apache24/htdocs" to DocumentRoot "d:/www";//root directory of the website

Line No. 238 <directory "C:/apache24/htdocs" > Changed to <directory "D:/www" >;

Note: This WWW folder to be built on its own, do not build the words will be error.

(5) Line No. 271 DirectoryIndex index.html Change to DirectoryIndex index.html index.php index.htm//Support more default pages

(6) No. 354 line scriptalias/cgi-bin/"c:/apache24/cgi-bin/" changed to scriptalias/cgi-bin/"d:/apache24/cgi-bin/"

(7) Line No. 370 <directory "C:/apache24/cgi-bin" > Changed to <directory "D:/apache24/cgi-bin" >

3. Launch Apache.

Start---Run, enter cmd, and open a command prompt. Then enter D: Enter CD Apache24\bin enter httpd enter

If the httpd.conf is configured correctly, there is no prompt after entering httpd carriage return.

5. Test. You can put the index.html in the Apache24\htdocs directory in the D:\www directory, access to the browser will appear "It works" that the Apache has been installed correctly.

Note: You cannot turn off this command window, otherwise Apache will shut down.

6. Join the system service for Windows and let Apache self-boot.

(1) Close the 3 httpd command window, or you will get an error.

(2) Start---Run, enter cmd, and then open a command prompt. Input d: Carriage return CD Apache24\bin Enter

The command to join the service here is: Httpd.exe-k install-n "ServiceName"

ServiceName is the name of Apache in Windows services. Example: Httpd.exe-k install-n "Apache24"

After entering Httpd.exe-k install-n "Apache24", there will be a successful installation of the prompt, "service" will also have Apache24 this service item. This time you can choose to start the Apache service.

If you want to uninstall this service, first stop the service and then enter Httpd.exe-k uninstall-n "Apache24" to uninstall the service.

This Apache can be controlled later by ApacheMonitor.exe under the Apache24\bin folder. The taskbar will also have a very handy management Apache run that shows this software.

Above from http://blog.csdn.net/zwfcan! Thanks to the original author!

Installation and configuration of Apache2.4-win32 under Win7

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.