服务器server2008网站iis7+php环境的搭建

IIS+FastCGI+PHP5_32_Gzip环境搭建
-------------------
0、装iis7
1、把php_5.32_win86解压到d:\php
2、php.ini文件已经配置好不需要在调,除非php解压的路径不是D:\PHP,否则要改extension_dir = "C:\php\ext"
3、装mysql_5.0和urlrewrite伪静态
4、打开IIS7主页中的【默认文档】添加index.aspx index.php index.asp
5、打开IIS7主页中的【处理程序映射】添 加模块映射-》内容如下
请求路径 *.php
模块 FastCgiModule
可执行文件 D:\php\php-cgi.exe
名称 PHP_FastCgi

6、打开IIS7主页中的【ASP】启用父路径为true
7、启用GZIP-》打开IIS7主页中的【压缩】√选启用动态内容压缩和静态内容压缩

8.打开C:\Windows\System32\inetsrv\config文件夹下找到applicationhost.config文件
找到节点httpCompression
增加子节点
<add mimeType="application/x-javascript" enabled="true" />
变成
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>


10打开 SQL Server 配置管理器->展开 SQL Server 2005/2008 网络配置节点 -->展开协议节点 --> 在协议右边启用 TCP/IP 协议

11、 c:\windows\temp 目录访问权限授予 IIS_IUSERS 和users 修改权限就可以,最后重启IIS即可
12、如果是配置win7或者server2008 64位系统无法链接MYSQL时,找到C:\Windows\System32\drivers\etc\hosts.config 打开把127.0.0.1 localhost 前面的#去掉即可
13、安装vcredist_x64_vc9运行库.exe和vcredist_x86_vc9运行库.exe

posted @ 2016-06-30 13:17  二年后的今天  阅读(1229)  评论(0编辑  收藏  举报