This article provides a very brief overview of how to install apache2.2.x and configure virtual directories under the Windows platform. As a reference for quick installation. The best documentation for the detailed setup is the official documentation. See the link below, and a careful review of the documentation when installing the configuration is a good solution.
1. Apache HTTP Server Version 2.2 English document
2. Apache HTTP Server Version 2.2 Chinese document
----------
Preparation conditions
----------
Download the corresponding version of Apache to http://httpd.apache.org/. (Note: 2.0 is different from the 2.2 version of Apache and is incompatible with each other, so you need to download the corresponding version of Apache based on your application.) If you do not need to use SSL, download the Apache 2.x.x-win32-x86-no_ssl.msi, and if you need to use it, you need to download Apache 2.x.x-win32-x86-openssl-x.x.x.msi
----------
Installation
----------
Double-click the installer, which will guide you through the installation process. Make sure you enter the correct server URL (if your server does not have a DNS name, you can enter the IP address directly). It is recommended that Apache be installed as "for all Users,on Port 80,as a service" Apache will automatically install a system service to start automatically. Note: If you already have an IIS or other program using port 80, the installation may fail. If so, you can find the file httpd.conf in the Apache groupapache2conf directory in the program directory, and convert listen 80 to a unused port, such as Listen 81. Then run the installer again, and this time there should be no more problems.
After the installation is finished, type http://loccalhost in the browser, and if a site is already configured, then Apache is installed successfully.
If you install Apache as a service, it will run with the local system account. It would be safer to create a separate user for Apache to run it.
Open the Apache installation directory, locate the file/conf/httpd.conf, and open it for configuration editing. The configuration file has a more detailed description of each item, and you can run the test Configuration tool in the Apache installation folder in the Start menu to verify that the configuration file is correct after the configuration is complete. A brief description is given if the configuration is incorrect. If you pass the test Configuration tool at the end of the configuration, but still do not run Apache successfully, you can go to the [Apache installation directory]/logs/directory to view the records to find out what the problem is.
----------
Configuring httpd.conf Files
----------
# set up the document home directory, followed by the disk directory
DocumentRoot "D:/programs/apache2.2/htdocs"
# Add a virtual directory, the following settings in the browser to enter http://localhost/webpath/time access to the server's "D:/programs/webpath" directory
alias/webpath/"D:/programs/webpath"
# when the/webpath is not followed by "/", in the browser can be entered Http://localhost/webpath Apache will automatically add "/" in the following
Alias/webpath "D:/programs/webpath"
# URL Redirection
Redirect permanent/foo/http://www.example.com/bar/
# Set Virtual Host: refer to http://lamp.linux.gov.cn/Apache/ApacheMenu/vhosts/index.html