{"id":573,"date":"2010-12-16T12:09:49","date_gmt":"2010-12-16T12:09:49","guid":{"rendered":""},"modified":"2010-12-16T12:09:49","modified_gmt":"2010-12-16T12:09:49","slug":"573","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=573","title":{"rendered":"IIS\u548cApache\u5171\u4eab80\u7aef\u53e3\u7684\u56db\u4e2a\u65b9\u6cd5"},"content":{"rendered":"<p>\u65b9\u6cd5\u4e00\uff1a<br \/>IIS5\uff0c\u591aIP\u4e0b\u5171\u5b58\uff0cIIS\u4e3a192.168.0.1\uff0capache\u4e3a192.168.0.2<br \/>c:InetpubAdminscripts<br \/>cscript adsutil.vbs set w3svc\/disablesocketpooling true<br \/>\u8be5\u547d\u4ee4\u53cd\u9988\u5982\u4e0bdisablesocketpooling : (BOOLEAN) True<br \/>\u91cd\u542fIIS<br \/>InetpubAdminScripts&gt;cscript adsutil.vbs set w3svc\/disablesocketpooling true<br \/>\u7531\u4e8e DisableSocketPooling \u5728 IIS 6.0 \u5143\u6570\u636e\u5e93\u67b6\u6784 (MBSchema.xml) \u4e2d\u88ab\u5b9a\u4e49\u4e3a\u6709\u6548\u5c5e\u6027\uff0c\u6240\u4ee5\uff0c\u60a8\u4ecd\u7136\u53ef\u4ee5\u4f7f\u7528 Adsutil.vbs \u8bbe\u7f6e\u8be5\u5c5e\u6027\uff0c\u4f46\u8fd9\u79cd\u8bbe\u7f6e\u4e0d\u8d77\u4f5c\u7528\u3002IIS 6.0 \u4e2d\u7684\u529f\u80fd\u662f\u65b0\u589e\u7684\u6838\u5fc3\u7ea7\u522b\u9a71\u52a8\u7a0b\u5e8f HTTP.sys \u7684\u4e00\u90e8\u5206\u3002\u8981\u914d\u7f6e HTTP.sys\uff0c\u60a8\u5fc5\u987b\u4f7f\u7528 Httpcfg.exe<\/p>\n<p>\u65b9\u6cd5\u4e8c\uff1a<br \/>IIS6\uff0c\u591aIP\u4e0b\u5171\u5b58\uff0cIIS\u4e3a192.168.0.1\uff0capache\u4e3a192.168.0.2<br \/>\u52302003\u7684CD\u4e0b\u7684 support\/tools\/Support.cab\u3002\u89e3\u538b\u51fahttpcfg.exe\u6587\u4ef6\uff0cCOPY\u5230windows\/system32\/\u76ee\u5f55\u4e0b\uff0c\u7528\u6cd5\u81ea\u5df1\u770b\u5e2e\u52a9<br \/>\u547d\u4ee4\u884c<br \/>\u7ed1\u5b9a\u5230\u67d0IP\uff1a httpcfg set iplisten -i 192.168.0.1<br \/>\u5373\u547d\u4ee4\u4f7f\u7528IIS\u7684\u53ea\u76d1\u542c\u6307\u5b9a\u7684IP\u53ca\u7aef\u53e3<br \/>\u67e5\u770b\u7ed1\u5b9a\uff1a httpcfg query iplisten<br \/>\u5220\u9664\u7ed1\u5b9a\uff1a httpcfg delete iplisten -i 192.168.0.1<br \/>\u547d\u4ee4\u884c<br \/>net stop Apache2<br \/>net stop iisadmin \/y<br \/>net START Apache2<br \/>net START w3svc<br \/>\u4fdd\u8bc1iis\u4e0b\u7684ip\u8bbe\u7f6e\u4e3a\u5168\u5c40\u9ed8\u8ba4\uff0cApache\u4e2dhttpconf\u8bbe\u7f6elisten 192.168.0.2:80\uff0c\u5c31\u5e94\u8be5\u53ef\u4ee5\u4e24\u4e2a\u670d\u52a1\u540c\u65f6\u8fd0\u884c\uff0c\u76f8\u4e92\u4e0d\u51b2\u7a81\u4e86\u3002<br \/>IIS\u7684\u8bbf\u95ee\u5730\u5740\u4e3a<a href=\"http:\/\/192.168.0.1\" target=\"_blank\" rel=\"external\">http:\/\/192.168.0.1<\/a>\uff0cApache\u8bbf\u95ee\u5730\u5740\u4e3a<a href=\"http:\/\/192.168.0.2\" target=\"_blank\" rel=\"external\">http:\/\/192.168.0.2<\/a><br \/>\u63d0\u9192\uff1aIIS\u8981\u6307\u5b9a\u4e3aIP\u5730\u5740192.168.0.1 \u7aef\u53e380\uff1bApache \u8bbe\u7f6elisten 192.168.0.2:80\u3002\u5173\u952e\u662fIIS\u7528httpcfg\u547d\u4ee4\u7ed1\u5b9a\u540e\uff0c\u8981\u91cd\u542f\u7cfb\u7edf\uff0c\u4ec5\u4ec5\u91cd\u542f\u670d\u52a1\u662f\u4e0d\u884c\u7684\u3002<\/p>\n<p>\u65b9\u6cd5\u4e09\uff1a<br \/>\u5c06apache\u8bbe\u4e3a\u4f7f\u752880\u7aef\u53e3\uff0cIIS\u4f7f\u7528\u5176\u5b83\u7aef\u53e3\uff0c\u6bd4\u598281\uff0c\u7136\u540e\u5c06apache\u4f5c\u4e3aIIS\u7684\u4ee3\u7406\u3002<br \/>\u5728httpd.conf\u91cc\u9762\uff0c\u53d6\u6d88\u4e0b\u9762\u56db\u884c\u7684\u6ce8\u91ca\uff1a<br \/>LoadModule proxy_module modules\/mod_proxy.so<br \/>LoadModule proxy_connect_module modules\/mod_proxy_connect.so<br \/>LoadModule proxy_http_module modules\/mod_proxy_http.so<br \/>LoadModule proxy_ftp_module modules\/mod_proxy_ftp.so<\/p>\n<p>\u7136\u540e\u5efa\u7acb\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\uff0c\u5c06\u8be5\u57df\u540d\u7684\u6240\u6709\u8bbf\u95ee\u8f6c\u541181\u7aef\u53e3\u3002<\/p>\n<p>ServerName iloves.vicp.net<br \/>ProxyPass \/ <a href=\"http:\/\/localhost:81\/\" target=\"_blank\" rel=\"external\">http:\/\/localhost:81\/<\/a><br \/>ProxyPassReverse \/ <a href=\"http:\/\/localhost:81\/\" target=\"_blank\" rel=\"external\">http:\/\/localhost:81\/<\/a><\/p>\n<p>\u8fd9\u6837\uff0c\u5bf9\u5916\u5c31\u53ef\u4ee5\u53ea\u9700\u8981\u4e00\u4e2a\u7aef\u53e3\uff0c\u5373\u53ef\u540c\u65f6\u4f7f\u7528apache\u548cIIS\u7684\u529f\u80fd\u4e86<\/p>\n<p>\u65b9\u6cd5\u56db\uff1a<br \/>\u7f51\u4e0a\u5e38\u7528\u7684\u5355IP\u5171\u752880\u7aef\u53e3\u65b9\u6cd5\uff0c\u4e0d\u8fc7\u4e0d\u63a8\u8350\uff0c\u53ea\u662f\u4f7f\u7528Apache\u7684\u4ee3\u7406\uff0c\u901f\u5ea6\u6709\u5f71\u54cd\u5c06apache\u8bbe\u4e3a\u4f7f\u752880\u7aef\u53e3\uff0cIIS\u4f7f\u7528\u5176\u5b83\u7aef\u53e3\uff0c\u6bd4\u598281\uff0c\u7136\u540e\u5c06apache\u4f5c\u4e3aIIS\u7684\u4ee3\u7406\u3002<br \/>\u5728httpd.conf\u91cc\u9762\uff0c\u53d6\u6d88\u4e0b\u9762\u56db\u884c\u7684\u6ce8\u91ca\uff1a<br \/>LoadModule proxy_module modules\/mod_proxy.so<br \/>LoadModule proxy_connect_module modules\/mod_proxy_connect.so<br \/>LoadModule proxy_http_module modules\/mod_proxy_http.so<br \/>LoadModule proxy_ftp_module modules\/mod_proxy_ftp.so<br \/>\u7136\u540e\u5efa\u7acb\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\uff0c\u5c06\u8be5\u57df\u540d\u7684\u6240\u6709\u8bbf\u95ee\u8f6c\u541181\u7aef\u53e3\u3002<br \/>ServerName iloves.vicp.net<br \/>ProxyPass \/ <a href=\"http:\/\/localhost:81\/\" target=\"_blank\" rel=\"external\">http:\/\/localhost:81\/<\/a><br \/>ProxyPassReverse \/ <a href=\"http:\/\/localhost:81\/\" target=\"_blank\" rel=\"external\">http:\/\/localhost:81\/<\/a><br \/>\u8fd9\u6837\uff0c\u5bf9\u5916\u5c31\u53ef\u4ee5\u53ea\u9700\u8981\u4e00\u4e2a\u7aef\u53e3\uff0c\u5373\u53ef\u540c\u65f6\u4f7f\u7528apache\u548cIIS\u7684\u529f\u80fd\u4e86<br \/>\u7c7b\u63a8\uff0c\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728IIS\u4e0a\u914d\u7f6ePHP4\uff0cApache2\u4e2d\u914d\u7f6ePHP5\uff0c\u53ea\u9700\u8981IIS\u4e2d\u5b89\u88c5PHP4\uff0c\u628aphp.ini\u590d\u5236\u5230windows\u76ee\u5f55\u5373\u53ef\uff0c\u8fd9\u4e2a\u5c31\u4e0d\u7528\u8bf4\u4e86\u5427\uff0cApache2\u4e2d\uff0c\u53ea\u8981\u628aPHP5\u7684php.ini\u653e\u5728PHP5\u5b89\u88c5\u76ee\u5f55\u91cc\u9762\u5c31\u884c\u4e86<br \/>\u914d\u7f6eApache\u4ee5\u652f\u6301PHP5\uff1a<br \/>LoadModule php5_module \u201cD:\/PHPServer\/PHP5\/php5apache2.dll\u201d<br \/>AddType application\/x-httpd-php .php<br \/>DirectoryIndex index.html index.php<br \/>PHPIniDir \u201cD:\/PHPServer\/PHP5\u2033<br \/>\u5176\u4e2d\u6700\u91cd\u8981\u7684\u4e00\u6761\u5c31\u662f PHPIniDir\uff0c\u7528\u6765\u6307\u660ephp.ini\u6587\u4ef6\u6240\u5728\u4f4d\u7f6e\uff0c\u5373PHP5\u7684\u5b89\u88c5\u76ee\u5f55\uff0c\u6ce8\u610f\u6240\u6709\u76ee\u5f55\u7684\u5e94\u8be5\u6539\u4e3aD:\/PHPServer\/PHP5\u8fd9\u79cd\u683c\u5f0f\uff0c \u800c\u975eD:PHPServerPHP5\uff0cIIS\u7684\u8bbf\u95ee\u5730\u5740\u4e3a<a href=\"http:\/\/192.168.0.1\" target=\"_blank\" rel=\"external\">http:\/\/192.168.0.1<\/a>\uff0cApache\u8bbf\u95ee\u5730\u5740\u4e3ahttp: \/\/192.168.0.2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u6cd5\u4e00\uff1aIIS5\uff0c\u591aIP\u4e0b\u5171\u5b58\uff0cIIS\u4e3a192.168.0.1\uff0cap&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-573","post","type-post","status-publish","format-standard","hentry","category-NetOS"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=573"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}