1. To avoid conflicts with IIS, be sure to stop the World Web Services service or simply uninstall IIS before installing Apache. This allows you to choose Apache as the Default Web Server, using port 80.
2, Apache operation after the permission set. This is a lot different from windows. Permissions are set in the configuration file. Open the configuration file httpd.conf and locate the following configuration section:
<directory/>
Options followsymlinks
allowoverride None order
deny,allow
deny
from all </Directory>
Changing the deny from "all" to allow from all solves the problem. Reference Links: http://www.piaoyi.org/php/apache-403-Forbidden.html
3, configure the virtual host. In order for the virtual host configuration to be stored in a separate configuration file, you need to include the configuration file in the main configuration file by using the Include method.
Include conf/extra/httpd-vhosts.conf
This statement is commented out by default, and the previous # number is deleted. Reference Links: http://blog.oolanguage.com/erpingwu/windows-%E4%B8%8B-apache-virtual-hosts-%E7%AE%80%E5%8D%95%E9%85%8D%E7%BD%AE/
4, configure PHP. In the configuration file, add the PHP module with the following code:
#加载php模块
LoadModule Php5_module D:/php5/php5apache2_2.dll
#指定php配置文件所在位置
Phpinidir "d:/php5/"
5, set the default document. Find the DirectoryIndex configuration section with the following code:
<ifmodule dir_module>
directoryindex index.php index.html
<IfModule>
6, a virtual host corresponding to multiple domain names.
A, the domain name resolution to the corresponding server IP address.
b, set the Vhost configuration section of the Serveralias, the code is as follows:
Serveralias www.ljf.cn ljf.cn *.docs.ljf.cn
Multiple domain names are separated by spaces, and wildcard characters are called universal Domain name resolution. This feature is better than IIS,
can easily do an IP corresponding to multiple domain name resolution. To accept a generic domain name on IIS, it is necessary to use an IP corresponding to an empty host header.
Reference URL: HTTP://WWW.PHPUP.NET/POST/18
This article starts: 剑锋 blog respects the author, please keep the link.