##DocumentRoot "D:/server/Apache/htdocs"
##<Directory />
## Options FollowSymLinks
## AllowOverride None
## Order deny,allow
## Deny from all
## Satisfy all
##</Directory>
##<Directory "D:/server/Apache/htdocs">
### Options Indexes FollowSymLinks
### AllowOverride None
### Order allow,deny
### Allow from all
###</Directory>
② DirectoryIndex index.html
改为:
DirectoryIndex index.php index.html index.htm index.wml
③为支持PHP,在文件末尾增加以下几行(cgi和module模式请选择一种,一般用module模式):
LoadModule php5_module "d:/server/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "d:/server/php"
④除掉这一行的注释(可以在httpd-vhosts.conf配置多个虚拟站点):
Include conf/extra/httpd-vhosts.conf
b.修改d:serverApacheconfextrahttpd-vhosts.conf
可把此文件的内容删除,然后拷贝下面的内容到文件中:
NameVirtualHost *:80
<VirtualHost *:80>
Options None
ServerAdmin [email protected]
DocumentRoot d:wwwxingmo
ServerName www1.xingmo.com
ErrorLog logs/www1.xingmo.com-error_log
CustomLog logs/www1.xingmo.com-access_log common
php_admin_value open_basedir "d:wwwxingmo"
</VirtualHost>