Apache installation
1. to Download Download
2. Download a good path to extract to plain English folder
3. Open as Administrator cmd
4. cd 刚刚解压的文件夹路径下的找到的bin文件夹
5. httpd.exe -k install
in 6. Apache24\conf
Locate httpd.conf
the file open for write
7. path to find here, as modified extracting the original path
8. httpd.exe ‐t
the display Syntax OK
11.
Restart the Apache service
httpd.exe ‐k restart ‐n "Apache"
Stop the Apache service
httpd.exe ‐k stop ‐n "Apache"
12. Enter the localhost FIG appear in the browser indicates successful installation
Configuration (httpd.conf for configuration file)
Default Document
When is a directory rather than a specific file accessed by the client, the server returns a document in the default directory under
Web Hosting
Get more than two in a host sites
with virtual host default host will fail
become the first virtual host
This feature allows the introduction of an external configuration file
below for an external configuration file (httpd-vhosts.conf) Configuring
remember plus label Directory
Virtual resolve domain names
Achieved by modifying the hosts file
PHP configuration support
Apache can handle only a static file requests for the suffix .php file this dynamic, it can not be performed, so as a static file is returned directly to the client. The client after receipt will not resolve the above code printed directly onto the page.
Apache is to find the file extension of the file type, and then one by one to try whether each module can handle this type of file, Ruoguo, these modules can not handle, Apache will handle, according to a static file processing mode.
PHP is installed on the server
1. Unzip php to plain English directory path
2. Add support PHP configuration in Apache
1. Add the PHP processing module in Apache
2. Add parse the .php extension support in the node
3. The default configuration file to add the node index. php
default document refers to when accessing a directory rather than a specific file name, the default file name execution