{"id":1511,"date":"2016-04-06T00:16:31","date_gmt":"2016-04-05T16:16:31","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1511"},"modified":"2016-04-07T14:14:20","modified_gmt":"2016-04-07T06:14:20","slug":"windows-%e4%b8%8b%e9%85%8d%e7%bd%ae-apache2-4-%e5%92%8cphp","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1511","title":{"rendered":"windows \u4e0b\u914d\u7f6e apache2.4 \u548cphp"},"content":{"rendered":"

1.\u4fee\u6539apache conf\/http.conf\u6587\u4ef6<\/p>\n

\u4fee\u6539\u7f51\u7ad9\u6839\u76ee\u5f55\u5730\u5740\uff1a<\/p>\n

Define SRVROOT “C:\\Users\\Administrator\\Desktop\\server\\apache”<\/p>\n

\u6dfb\u52a0apache\u52a0\u8f7dphp\u7684\u6269\u5c55\u53ca\u6307\u5b9a\u52a0\u8f7d\u7684php.ini\u6587\u4ef6\u5939\u8def\u5f84<\/p>\n

LoadModule php5_module “C:\\Users\\Administrator\\Desktop\\lnmp\\php-5.6.20-Win32-VC11-x64\\php5apache2_4.dll”
\nPHPIniDir “C:\\Users\\Administrator\\Desktop\\lnmp\\php-5.6.20-Win32-VC11-x64”<\/p>\n

\u628aphp.ini-development\u590d\u5236\u4e00\u4efd\uff0c\u91cd\u65b0\u5168\u540d\u4e3a php.ini<\/p>\n

\u6dfb\u52a0\u6307\u4ee4\u8ba9apache\u53ef\u4ee5\u89e3\u6790php\u6587\u4ef6<\/p>\n

AddType application\/x-httpd-php .php<\/p>\n

\u4fee\u6539\u6587\u4ef6\u5939\u9ed8\u8ba4\u9996\u9875\u6587\u4ef6\uff0c\u6dfb\u52a0 index.php\u4f5c\u4e3a\u9ed8\u8ba4\u9996\u9875<\/p>\n

<IfModule dir_module>
\nDirectoryIndex index.php index.html
\n<\/IfModule><\/p>\n

apache \u4e0d\u5217\u51fa\u76ee\u5f55 \u628a Options Indexes FollowSymLinks \u6539\u4e3a<\/p>\n

Options FollowSymLinks<\/p>\n

\u53ea\u9700\u8981\u5c06\u4e0a\u9762\u4ee3\u7801\u4e2d\u7684 Indexes \u53bb\u6389\uff0c\u5c31\u53ef\u4ee5\u7981\u6b62 Apache \u663e\u793a\u8be5\u76ee\u5f55\u7ed3\u6784\u3002\u7528\u6237\u5c31\u4e0d\u4f1a\u770b\u5230\u8be5\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\u5217\u8868\u4e86\u3002Indexes \u7684\u4f5c\u7528\u5c31\u662f\u5f53\u8be5\u76ee\u5f55\u4e0b\u6ca1\u6709 index.html \u6587\u4ef6\u65f6\uff0c\u5c31\u663e\u793a\u76ee\u5f55\u7ed3\u6784\uff0c\u53bb\u6389 Indexes \uff0cApache \u5c31\u4e0d\u4f1a\u663e\u793a\u8be5\u76ee\u5f55\u7684\u5217\u8868\u4e86\u3002<\/p>\n

\u91cd\u8981 \uff1a\u5728httpd\u4e2d\u52a0\u5165\u4ee5\u4e0b\u4e24\u4e2a\u53c2\u6570\uff01<\/span><\/p>\n

# AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and
\n# will not recycle sockets between connections. This is useful for network
\n# adapters with broken driver support, as well as some virtual network
\n# providers such as vpn drivers, or spam, virus or spyware filters.
\nAcceptFilter http none
\nAcceptFilter https none<\/p>\n


\n

cmd \u547d\u4ee4\u628a apache \u6dfb\u52a0\u5230\u670d\u52a1<\/p>\n

httpd.exe -k install<\/p>\n

\u5176\u5b9e\u53ef\u4ee5httpd -help \u67e5\u770b\u547d\u4ee4\u5e2e\u52a9<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

1.\u4fee\u6539apache conf\/http.conf\u6587\u4ef6 \u4fee\u6539\u7f51\u7ad9\u6839\u76ee\u5f55\u5730\u5740\uff1a Define SRVROOT “C:\\Users\\Administrator\\Desktop\\server\\apache” \u6dfb\u52a0apache\u52a0\u8f7dphp\u7684\u6269\u5c55\u53ca\u6307\u5b9a\u52a0\u8f7d\u7684php.ini\u6587\u4ef6\u5939\u8def\u5f84 LoadModule php5_module “C:\\Users\\Administrator\\Desktop\\lnmp\\php-5.6.20-Win32-VC11-x64\\php5apache2_4.dll” PHPIniDir “C:\\Users\\Administr<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,224,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1511"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1511"}],"version-history":[{"count":6,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1511\/revisions"}],"predecessor-version":[{"id":1519,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1511\/revisions\/1519"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1511"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}