{"id":617,"date":"2008-02-05T06:37:54","date_gmt":"2008-02-05T06:37:54","guid":{"rendered":"http:\/\/fanhaijun.com\/?p=617"},"modified":"2008-02-05T06:37:54","modified_gmt":"2008-02-05T06:37:54","slug":"%e9%85%8d%e7%bd%aeapache-php","status":"publish","type":"post","link":"https:\/\/fanhaijun.com\/?p=617","title":{"rendered":"\u914d\u7f6eapache php"},"content":{"rendered":"<p><span style=\"font-size:18pt\"><span style=\"color:Red\"><b>\u6ce8\u610f\u5927\u5c0f\u5199<\/b><\/span><\/span><\/p>\n<p>\u4fee\u6539Apache\u914d\u7f6e:httpd.conf&nbsp;<\/p>\n<p>\u5728D\u76d8\u65b0\u5efa\u4e00\u4e2a\u540d\u4e3awwwroot\u7684\u6587\u4ef6\u5939(\u7f51\u7ad9\u9ed8\u8ba4\u76ee\u5f55)&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>DocumentRoot&nbsp;&quot;D:\/Apache\/htdocs&quot;&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>DocumentRoot&nbsp;&quot;D:\/wwwroot&quot;&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>&lt;Directory&nbsp;&quot;D:\/Apache\/htdocs&quot;&gt;&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>&lt;Directory&nbsp;&quot;D:\/wwwroot&quot;&gt;&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>DirectoryIndex&nbsp;index.html&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>DirectoryIndex&nbsp;index.html&nbsp;index.htm&nbsp;index.php&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>#LoadModule&nbsp;ssl_module&nbsp;modules\/mod_ssl.so&nbsp;<br \/>\u5728\u4e0b\u9762\u6dfb\u52a0&nbsp;<br \/>LoadModule&nbsp;php5_module&nbsp;&quot;D:\/PHP5\/php5apache2_2_filter.dll&quot;&nbsp;<\/p>\n<p>\u5728httpd.conf\u6587\u4ef6\u6700\u540e\u9762\u6dfb\u52a0\u4e0b\u9762\u8bed\u53e5&nbsp;<br \/>#&nbsp;PHP5&nbsp;<br \/>PHPIniDir&nbsp;&quot;D:\/PHP5&quot;&nbsp;<br \/>ScriptAlias&nbsp;\/php\/&nbsp;&quot;D:\/PHP5\/&quot;&nbsp;<br \/>Action&nbsp;application\/x-httpd-php&nbsp;&quot;d:\/php\/php-cgi.exe&quot;&nbsp;<br \/>AddType&nbsp;application\/x-httpd-php&nbsp;.php&nbsp;<\/p>\n<p>=======================================================================&nbsp;<\/p>\n<p>\u4fee\u6539PHP\u914d\u7f6e:php.ini&nbsp;<\/p>\n<p>\u5c06php.ini-dist\u91cd\u547d\u540d\u4e3aphp.ini&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>extension_dir&nbsp;=&nbsp;&quot;.\/&quot;&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>extension_dir&nbsp;=&nbsp;&quot;D:\/PHP5\/ext&quot;&nbsp;<\/p>\n<p>\u5206\u522b\u627e\u5230&nbsp;<br \/>;extension=php_mbstring.dll&nbsp;<br \/>;extension=php_mysql.dll&nbsp;<br \/>;extension=php_gd2.dll&nbsp;<br \/>\u5206\u522b\u4fee\u6539\u4e3a&nbsp;<br \/>extension=php_mbstring.dll&nbsp;<br \/>extension=php_mysql.dll&nbsp;<br \/>extension=php_gd2.dll&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>;date.timezone&nbsp;=&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>date.timezone&nbsp;=&nbsp;Asia\/Shanghai&nbsp;<br \/>(\u65f6\u533a\u53c2\u89c1http:\/\/us3.php.net\/manual\/en\/timezones.asia.php)&nbsp;<\/p>\n<p>\u5728PHP\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2asession\u6587\u4ef6\u5939&nbsp;<\/p>\n<p>\u627e\u5230&nbsp;<br \/>;session.save_path&nbsp;=&nbsp;&quot;\/tmp&quot;&nbsp;<br \/>\u4fee\u6539\u4e3a&nbsp;<br \/>session.save_path&nbsp;=&nbsp;&quot;D:\/PHP5\/session&quot;&nbsp;<\/p>\n<p>=======================================================================&nbsp;<\/p>\n<p>\u5982\u88c5\u597d\u540e\u51fa\u73b0\u65e0\u6743\u8bbf\u95ee\u8be5\u9875\u9762,\u5728httpd.conf\u4e2d\u627e\u5230\u4ee5\u4e0b\u5185\u5bb9:&nbsp;<br \/>&lt;Directory&nbsp;\/&gt;&nbsp;<br \/>Options&nbsp;FollowSymLinks&nbsp;<br \/>AllowOverride&nbsp;None&nbsp;<br \/>Order&nbsp;deny,allow&nbsp;<br \/>Deny&nbsp;from&nbsp;all&nbsp;<br \/>Satisfy&nbsp;all&nbsp;<br \/>&lt;\/Directory&gt;&nbsp;<br \/>\u5c06Deny&nbsp;from&nbsp;all\u4fee\u6539\u4e3aAllow&nbsp;from&nbsp;all\u5373\u53ef!&nbsp;<\/p>\n<p>=======================================================================&nbsp;<\/p>\n<p>\u6d4b\u8bd5\u5b89\u88c5\u662f\u5426\u6210\u529f:&nbsp;<br \/>\u5728wwwroot\u4e0b\u65b0\u5efa\u4e00\u4e2ainfo.php,\u5185\u5bb9\u5982\u4e0b:&nbsp;<\/p>\n<p>&lt;?php&nbsp;<br \/>phpinfo();&nbsp;<br \/>?&gt;&nbsp;<\/p>\n<p>\u6d4f\u89c8\u5668\u4e0b\u6253\u5f00&nbsp;http:\/\/localhost\/info.php&nbsp;<\/p>\n<p>\u5982\u5404\u9879\u90fd\u6b63\u5e38\u663e\u793a(mysql,session\u7b49&#8230;),\u5373OK!<\/p>\n<p>\u53e6\u5916,\u5728vista&nbsp;home&nbsp;basic&nbsp;\u6ca1\u6709iis\uff0c\u6b64\u65f6\u53ea\u80fd\u5b89\u88c5apache,\u4f46\u662f\u5b89\u88c5\u540e\u4e00\u822c\u4f1a\u51fa\u73b0\u9519\u8bef\uff0c\u56e0\u4e3a80\u7aef\u53e3\u88ab\u5360\u7528\uff0c\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\u5728\u6253\u5f00\u6216\u5173\u95edwindows\u7a0b\u5e8f\u91cc\u9762\u9009\u62e9iis\uff0c\u91cd\u542f\uff1b\u518d\u540c\u6837\u5173\u95ed\u5b83\uff0c\u518d\u91cd\u542f\uff0c\u8fd9\u6837apache\u5c31\u53ef\u4ee5\u4f7f\u752880\u7aef\u53e3\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f\u5927\u5c0f\u5199 \u4fee\u6539Apache\u914d\u7f6e:httpd.conf&#038;nb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[104],"tags":[],"class_list":["post-617","post","type-post","status-publish","format-standard","hentry","category-technogy"],"_links":{"self":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=617"}],"version-history":[{"count":0,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/617\/revisions"}],"wp:attachment":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}