Download, install and configure the latest version of Apache server (win version)
Apache download:
-
Log in to the address http://httpd.apache.org/download.cgi and find 2.4.10, as shown below:
-
After entering the following interface, select the first item ApacheHaus, which is a third-party download platform. Downloading an independent Apache from its website will be a compressed package
Of the other four, the second is also a standalone Apache download address, and the other three are integrated development environments.
My first choice.
-
In the new interface, you will find the words VC9 and VC11. By reading the relevant content, we know that VC9 refers to the code compiled with VS2008, while VC11 is compiled with VS2012, and the compiled code with VS2012 cannot be used in windows xp and server 2003. use.
For the sake of compatibility, the editor selected 64-bit Apache compiled with VC9, choose to download
At this point, the download process is complete!
-
The installation process is very simple, because it is a compressed package, so first unzip the Apache24 in the unzip package to a suitable location
-
The name of Apache24 can be changed according to your own situation, the editor changed it to "Apache",
and put it in the directory D:\application_software\
END
Configuration process:
-
Find the D:\application_software\Apache\conf\httpd.conf file, open it with Notepad, find the item: Define SRVROOT, and change the value on the right to it
The directory address where your Apache installation is currently stored is shown below:
-
Keep looking, find: Listene 80
If your port 80 is occupied (you can view it with the command netstat -a under cmd), then change port 80 to something else
Save the httpd.conf file.
-
Next, you need to configure the main service for installing Apache. With it, Apache can be started:
Open the CMD window and enter: "D:\application_software\Apache\bin\httpd.exe" -k install -n apache
Remember to include quotation marks. The command means, install the apache service, and name the service apache (you can also change it to something else), press Enter.
After the service is installed, it will be automatically tested. If there is a problem, the window will prompt an error. At this time, please check according to the error.
The normal installation is completed as shown in the following figure:
Among them, Errors reported here must be corrected before the service can be started. It means that if there is an error message after the sentence, it means that the service installation failed and the error needs to be corrected first. If not, it succeeds.
-
In the installation directory, find the D:\application_software\Apache\bin\ApacheMonitor.exe executable file, double-click to run, an icon will appear in the lower right corner of the desktop, double-click to open the window interface, and you will see as shown:
-
Click start on the left to start the apache service.
Supplementary sentence, it can be seen from this interface that it can manually control the opening and closing of the service. In order to save resources, when closing the Apache server, please click "Stop" to close the apache service first.
Of course, the service can also be turned off in the windows system service (it is recommended to set it manually)
The following image shows the status of the service being displayed successfully:
-
Open your browser and enter access
http://localhost If the interface shown in the figure below appears, the basic configuration of the Apache server is completed, and the Apache server can be run at this time. For more specific configuration, users need to comprehend it by themselves.
END
Supplement: Uninstallation of apache service
-
If you no longer want to use the Apache server software and want to uninstall it, you need to uninstall the apache service first (remember, if you delete the folder of the installation path directly, there will be residual files on the computer, which may cause unnecessary trouble)
In the CMD command window, enter the following (it is recommended to stop the service first and then delete it):
sc delete apache
apache is the service name of the Apache server