Apache server download, install, configure

Source: Internet
Author: User

1. Download: Apache Click the link under "Download" on the left to open the following page

Here you can choose the version, I choose 2.4.16, click "2.4.16"
Click "Files for Microsoft Windows"
Click the first item "Apchehaus"
Click on the icon under "Download" in the red area above to download it and download it after extracting the directory below.
2. Configuration because download is not the installation version of the. msi, so we can not directly double-click the installation program to perform a dummy installation, but we need to configure, after the configuration of the results and we installed the same as the future, in fact, I think this way more simple. Choose Apache Storage directory In my case, I would like to put Apache files in the D packing directory (you can certainly put deeper), the action is to do is to copy the folder Apache24 to the D-packing directory. The remaining two files can be used without a. Modify profile This time open the Apache24 folder under the D disk under the Conf folder, use the Text tool to open the httpd.conf file, you can use Notepad, but we recommend the use of tools such as sublime, because these tools will display the line number, convenient for us to find. Found 37 rows of: ServerRoot "C:/apache24" to ServerRoot "D:/apache24", that is, to change the address to the actual address of the Apache24 folder we found 209 rows of serveradmin [email  protected], here can be changed or not, if you want to change, then change to their own mailbox on it. Found 218 rows of ServerName www.example.com:80  changed to  servername 127.0.0.1:80, here is actually to the server an address and port number, if only LAN access, The server is configured to 127.0.0.1, port number 80 can also be changed to another port to find 242 lines of DocumentRoot "C:/apache24/htdocs" changed to DocumentRoot "D:/apache24/htdocs", It's just a change of the letter. Found 243 lines of <directory "C:/apache24/htdocs" > Changed to <directory "D:/apache24/htdocs" >, also changed a drive letter. Found 276 rows of DirectoryIndex index.html changed to DirectoryIndex index.html index.php index.htm, only after adding two other documents in the format. Found 359 rows of  scriptalias/cgi-bin/"c:/apache24/cgi-bin/" changed to  scriptalias/cgi-bin/"d:/apache24/cgi-bin/", Just changed the drive letter. Found 375 rows of <directoRy "C:/apache24/cgi-bin" > Changed to <directory "D:/apache24/cgi-bin", change the drive letter. So far, the relevant configuration has been changed. Start Apache Start-run, enter CMD, open the Command window, note that if it is a win8 or 8.1 system, you need a "command prompt (Administrator)" Way to open the Command window. Enter D "&NBSP;, enter the drive into the D-disk input CD Apache24, enter into this directory input CD bin, return, enter the bin directory input httpd, enter this time if nothing is realistic, then congratulations, all the previous configuration is successful, if not successful, A pop-up window will make an error. The error could be this
Then you need to installMicrosoft Visual C + + SP1 Redistributable Package (x64), if you have installed vs on your computer, this is already installed, and if you still get errors after installation, such as Msvruntime, Just go to download aVisual C + + redistributable for Visual Studio Rc,:visual C + + redistributable for Visual Studio RC, after installation in the execution "htt PD "command is fine. adding Apache to System servicesabove using the httpd command to start the Apache service, this command window can not be closed, otherwise the service stopped, obviously this is very impersonal, we want to other programs, such as SQL Server, as long as the service of this program has been started, the service will not be very, Instead of opening the command window each time, enter a series of commands above. first, close the command window and stop the Apache servicethen start-run, enter CMD, as above, you should open the Command window as an administrator, or you might get a denial-of-access situation. Enter D:, enter the D driveEnter CD Apache24, enter this directoryEnter the CD bin and enter into the bin directoryinput httpd.exe-k install-n "ServerName", enter, add service, ServerName, is the name of the service you added to the list of services, can be customized, for example, I use "Apache"
If your service is added successfully, the service will appear in the list of services that is marked blue. Now you have two ways to start the Apache service, one is to open a command window, enter a series of commands (see above), and start the service in this interface. Well, at this point, the Apache server download, configuration is over, applause applause!


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Apache server download, install, configure

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.