<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>浮山狼de博客 &#187; apache2.2.17</title>
	<atom:link href="https://www.fushanlang.com/tag/apache2-2-17/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fushanlang.com</link>
	<description>next station - 下一站，活在当下，且行且思</description>
	<lastBuildDate>Sat, 29 Nov 2014 15:14:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.5</generator>
	<item>
		<title>win2003 apache2.2.17 php5.3配置</title>
		<link>https://www.fushanlang.com/win2003-apache2-2-17-php5-3-configuration-1847/</link>
		<comments>https://www.fushanlang.com/win2003-apache2-2-17-php5-3-configuration-1847/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 03:17:56 +0000</pubDate>
		<dc:creator><![CDATA[fushanlang]]></dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2.2.17]]></category>

		<guid isPermaLink="false">http://www.fushanlang.com/blog/?p=1847</guid>
		<description><![CDATA[Win2003 安装 apache 2.2.17 + php5.3.4 或5.3.6 +  Mysql 配置 Aapache安装 <p>apache-2.2.17 下载地址 ：http://httpd.apache.org/download.cgi   ， http://www.apache.org/dist//httpd/binaries/win32/</p> <p>版本选择httpd-2.2.17-win32-x86-no_ssl.msi (openssl多了个ssl安全认证模式，它的协议是HTTPS而不是HTTP，无特殊ssl连接需要下载no_ssl的版本即可)。</p> <p>安装：一路next 下去 填写 network domain、server domain 一般填“localhost”即可，管理员邮箱随便填一个邮箱就可以（以后服务器出现问题，会提示联系管理员邮箱，方便处理问题。）</p> <p>安装成功：一般安装结束时会请求是否开启apache服务，可以确定开启，自动打开Apache Service Monitor 同时在电脑右下角的任务栏里有一个绿色的apache服务器运行图标，显示为&#8221;&#62;&#8221; 启动状态，此时可以本地打开浏览器输入http://localhost 或者 http://127.0.0.1 或者在其他机器上输入 该服务器ip到浏览器访问 http://xx.xx.xx.xx/  可以看到简单的测试页面 &#8220;It works&#8221; 说明apache已经成功运行。</p> PHP安装 <p>php5.3.4 ，5.3.6(最新)，5.2.17(老稳定版本，不再后续支持)  下载地址：http://windows.php.net/download/</p> <p>版本选择  Thread Safe （window下一般开发环境用此版本即可，如果是以FastCGI来执行PHP时考虑到效率，需要采用None Thread Safe版本）.</p> <p>下载zip版本 此处我 解压缩到 &#8220;C:/php-5.3.6-Win32-VC9-x86&#8243;，注意如果是在win2003下运行php5.3 以上用vc9 <span style="color:#777"> . . . &#8594; Read More: <a href="https://www.fushanlang.com/win2003-apache2-2-17-php5-3-configuration-1847/">win2003 apache2.2.17 php5.3配置</a></span>]]></description>
				<content:encoded><![CDATA[<h2>Win2003 安装 apache 2.2.17 + php5.3.4 或5.3.6 +  Mysql 配置</h2>
<h2><strong>Aapache安装</strong></h2>
<p><strong>apache-2.2.17</strong> 下载地址 ：http://httpd.apache.org/download.cgi   ， http://www.apache.org/dist//httpd/binaries/win32/</p>
<p>版本选择<strong>httpd-2.2.17-win32-x86-no_ssl.msi </strong>(openssl多了个ssl安全认证模式，它的协议是HTTPS而不是HTTP，无特殊ssl连接需要下载no_ssl的版本即可)。</p>
<p><strong>安装：</strong>一路next 下去 填写 network domain、server domain 一般填“<strong>localhost</strong>”即可，管理员邮箱随便填一个邮箱就可以（以后服务器出现问题，会提示联系管理员邮箱，方便处理问题。）</p>
<p><strong>安装成功：</strong>一般安装结束时会请求是否开启apache服务，可以确定开启，自动打开<strong>Apache Service Monitor</strong> 同时在电脑右下角的任务栏里有一个绿色的apache服务器运行图标，显示为&#8221;&gt;&#8221; 启动状态，此时可以本地打开浏览器输入http://localhost 或者 http://127.0.0.1 或者在其他机器上输入 该服务器ip到浏览器访问 http://xx.xx.xx.xx/  可以看到简单的测试页面 <strong>&#8220;It works&#8221;</strong> 说明apache已经成功运行。<span id="more-1847"></span></p>
<h2>PHP安装</h2>
<p>php5.3.4 ，5.3.6(最新)，5.2.17(老稳定版本，不再后续支持)  下载地址：http://windows.php.net/download/</p>
<p>版本选择  <strong>Thread Safe</strong> （window下一般开发环境用此版本即可，如果是以<strong>FastCGI</strong>来执行PHP时考虑到效率，需要采用None Thread Safe版本）.</p>
<p>下载<strong>zip</strong>版本 此处我 解压缩到 &#8220;C:/php-5.3.6-Win32-VC9-x86&#8243;，注意如果是在<strong>win2003</strong>下运行php5.3 以上用vc9 编译的版本的话，有可能会遇到无法运行的情况，即双击php.exe 会弹出“<strong>由于应用程序配置不正确，应用程序未能启动</strong>” 的问题，这是由于该版本的php采用vc9编译，而该<strong>win2003</strong>系统缺少运行库导致的，可以安装 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF">Microsoft 2008 C++ Runtime (x86)</a> 来保证运行。</p>
<p><strong>问题：</strong>常见问题在配置apache里的httpd.conf 时 LoadModule php5_module 缺少 “<strong>php5apache2_2.dll</strong>” 的情况是因为下错了php版本，在Thread Safe版本下是具有php5apache2_2.dll的，而None Thread Safe版本 没有这个文件一般只用于fastcgi 所以不需要这个文件。<strong><br />
</strong></p>
<h2>MySQL安装</h2>
<p>一般安装mysql&#8211;5.1.45-win32.msi即可，安装过程中填写root密码，选择数据库编码utf8 启用innodb 选项一步一步next即可。安装成功后mysql就会以windows服务的方式启动了。</p>
<h2><strong>综合配置</strong></h2>
<p><strong>1.配置Apache：</strong></p>
<p>apache安装目录下的conf/httpd.conf 文件是比较重要的配置文件，如果害怕修改配置文件出错，则要养成修改配置文件前备份的习惯，以防出错。</p>
<p><strong>1.1 配置www网站根目录</strong>：</p>
<pre>
DocumentRoot "E:/www"
&lt;Directory "E:/www"&gt;
Options Indexes FollowSymLinks <strong>Includes ExecCGI</strong>
AllowOverride <strong>All</strong>（在打开mod_rewrite的情况下允许htaccess文件定义时需要设置为All 默认为None）
Order allow,deny
Allow from all
&lt;/Directory&gt;
</pre>
<p><strong>1.2 配置mod_rewrite:</strong></p>
<p>LoadModule rewrite_module modules/mod_rewrite.so  <br/>(现在非常流行使用rewrite功能达到美化，隐藏安全url访问的目的，打开此模块的同时也要注意目录下的AllowOverride <strong>All</strong>，才能允许htaccess有效)</p>
<p><strong>1.3A 一种方式配置mod_php：(大多数情况下采用以mod_php方式运行)</strong></p>
<pre>
（PHPIniDir为指定 php.ini的位置，可以直接放在php版本目录里面）
（以mod_php的方式运行php时需要加载 php5_module）

PHPIniDir "C:/php-5.3.6-Win32-VC9-x86"
LoadModule php5_module C:/php-5.3.6-Win32-VC9-x86/php5apache2_2.dll

（设置目录下网站首页的访问顺序如果要运行php，可以讲index.php至于前面优先访问index.php为主页）

&lt;IfModule dir_module&gt;
DirectoryIndex <strong>index.php</strong> index.html index.htm
&lt;/IfModule&gt;

（设置php5解释器，解释文件的扩展名，即访问.php或者.php3或者.phps时,
都会视为application/x-httpd-php请求，用php5解释器来解释运行）

&lt;IfModule mod_php5.c&gt;()
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
&lt;/IfModule&gt;
</pre>
<p><strong>1.3B 另一种方式配置fastcgi：(与mod_php配置有些不同，在windows下不太安全但如果要考验效率的话可以试一试)</strong></p>
<p>下载<strong>mod_fcgid-2.3.6-win32-x86</strong>，下载地址：http://httpd.apache.org/mod_fcgid/  ，下载完后 直接将 module 目录合并到 apache 安装目录下的module即可。</p>
<pre>
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script .fcgi .php
#php.ini的存放目录
FcgidInitialEnv PHPRC "C:/php-5.3.6-Win32-VC9-x86/"
# 设置PHP_FCGI_MAX_REQUESTS大于或等于FcgidMaxRequestsPerProcess，
#防止php-cgi进程在处理完所有请求前退出
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
#php-cgi每个进程的最大请求数
FcgidMaxRequestsPerProcess 1000
#php-cgi最大的进程数
FcgidMaxProcesses 3
#最大执行时间
FcgidIOTimeout 120
FcgidIdleTimeout 120
#php-cgi的路径
FcgidWrapper "C:/php-5.3.6-Win32-VC9-x86/php-cgi.exe" .php
AddType application/x-httpd-php .php
</pre>
<p><strong>#这两种方式运行php时，检查phpinfo(）可以清楚的看到两者的不同。</strong></p>
<p><strong>2. 配置PHP.ini</strong>:</p>
<pre>
date.<strong>timezone</strong> ="Asia/Shanghai"  
#(设置一下时区，一般国内可以设置为Asia/Shanghai ，不设置有些用到时间的php应用回报警告，
#ps：它又不会GPS定位你所在时区，O(∩_∩)O哈哈~)

<strong>extension_dir</strong> = "C:/php-5.3.6-Win32-VC9-x86/ext"  
#（extension_dir 指定php扩展的目录位置，必须指定绝对物理路径，
#否则加载某些扩展会找不到dll文件）
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_mysql.dll
extension=php_pdo_mysql.dll
</pre>
<p>上面打开一般的图形扩展和mysql数据库扩展，也可根据需要打开 extension=php_curl.dll 扩展之类。</p>
<p>修改完配置要重启apache服务，在Apache Service Monitor里 restart即可，然后可以测试phpinfo（） 是否okay。</p>
<p>希望对用的童鞋有用！：）</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fushanlang.com/win2003-apache2-2-17-php5-3-configuration-1847/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.169 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2026-02-27 16:44:03 -->
