apache针对php配置

1:修改网站默认首页文件 加入php文件
  在httpd.conf 下DirectoryIndex

<IfModule dir_module>
	DirectoryIndex index.html, index.php
</IfModule>

 2:虚拟主机配置
     我们需要建立虚拟主机,使应用程序分别在独立的网站内运行。

 屏蔽掉默认的网站,即在以下配置语句前加个注释符号#(也可以删除该语句):
    #DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
    然后在该语句下键入以下一段语句:

<VirtualHost *:8080>
        ServerAdmin [email protected]
        DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/phpchina1.com"
        ServerName phpchina1.com
        ErrorLog "logs/phpchina1.com-error.log"
        CustomLog "logs/phpchina1.com-access.log" common
    </VirtualHost>

 

 

猜你喜欢

转载自yangbinfx.iteye.com/blog/1914846