Apache的httpd.conf文件配置
1、配置PHP目录(适用Windows下的Apache2.2及其以后版本)
LoadModule php5_module "F:/Program Files/PHP5/php5apache2_2.dll"
PHPIniDir "F:/Program Files/PHP5"
2、配置支持PHP、html、wml
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
AddType text/vnd.wap.wml wml
AddType application/x-httpd-php .html
AddType text/vnd.wap.wml wml
3、设置首页访问的默认后缀
DirectoryIndex index.php index.html
4、设置虚拟端口及虚拟目录
NameVirtualhost localhost:81
<virtualhost localhost:81>
documentroot "F:\phpweb\example"
servername locahost:81
<Directory "F:\phpweb\example">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</virtualhost>
<virtualhost localhost:81>
documentroot "F:\phpweb\example"
servername locahost:81
<Directory "F:\phpweb\example">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</virtualhost>