{"id":472,"date":"2010-07-09T12:05:10","date_gmt":"2010-07-09T12:05:10","guid":{"rendered":""},"modified":"2010-07-09T12:05:10","modified_gmt":"2010-07-09T12:05:10","slug":"472","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=472","title":{"rendered":"Apache+php\u591a\u7aef\u53e3\u591a\u7ad9\u70b9\u8bbe\u7f6e"},"content":{"rendered":"<p>\u914d\u7f6ehttpd.conf<\/p>\n<p>\u76d1\u542c\u591a\u4e2a\u7aef\u53e3<br \/># Listen: Allows you to bind Apache to specific IP addresses and\/or<br \/># ports, instead of the default. See also the &lt;VirtualHost&gt;<br \/># directive.<br \/>#<br \/># Change this to Listen on specific IP addresses as shown below to <br \/># prevent Apache from glomming onto all bound IP addresses.<br \/>#<br \/>#Listen 12.34.56.78:80<br \/>Listen 8081<br \/>Listen 8082<br \/>Listen 8083<br \/>#\u589e\u52a0\u76d1\u542c\u7aef\u53e3<br \/>\u7b49\u4ee5\u4e0b\u5185\u5bb9\u90fd\u8bbe\u7f6e\u4ee5\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7netstat -n -a\u67e5\u770b\u7aef\u53e3\u662f\u5426\u5f00\u542f<br \/>\u5f00\u542f\u865a\u62df\u7ad9\u70b9<\/p>\n<p># Virtual hosts<br \/>#Include conf\/extra\/httpd-vhosts.conf<br \/>#\u4fee\u6539\u4e3a<br \/># Virtual hosts<br \/>Include conf\/extra\/httpd-vhosts.conf<br \/>\u914d\u7f6ePHP\u6a21\u5757<br \/>\u52a0\u8f7dphp\u6a21\u5757,php5apache2_2\u4ee3\u8868\u4f7f\u7528\u7684\u662fapache2.2\u6216\u4ee5\u4e0a\u7248\u672c<br \/>LoadModule php5_module \u201dc:\/php\/php5apache2_2.dll\u201d<br \/>PHPIniDir \u201dC:\/php\u201d<br \/>\u914d\u7f6ephp\u6587\u4ef6\u7c7b\u578b\u6620\u5c04<br \/>AddType application\/x-httpd-php .php<br \/>\u914d\u7f6econf\/extra\/httpd-vhosts.conf<br \/>&lt;VirtualHost *:8082&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ServerAdmin webmaster@dummy-host.localhost<br \/>&nbsp;&nbsp;&nbsp;&nbsp;DocumentRoot \u201dC:\/PhpDocRoot\/Site1\u2033<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ServerName localhost<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ServerAlias localhost<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ErrorLog \u201dlogs\/dummy-host.localhost-error.log\u201d<br \/>&nbsp;&nbsp;&nbsp;&nbsp;CustomLog \u201dlogs\/dummy-host.localhost-access.log\u201d common<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory \u201dC:\/PhpDocRoot\/Site1\u2033&gt;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes FollowSymLinks<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&#114;der allow,deny<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/Directory&gt;<br \/>&lt;\/VirtualHost&gt;<br \/>&lt;VirtualHost *:8083&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ServerAdmin webmaster@dummy-host2.localhost<br \/>&nbsp;&nbsp;&nbsp;&nbsp;DocumentRoot \u201dC:\/PhpDocRoot\/Site2\u2033<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ServerName localhost<br \/>&nbsp;&nbsp;&nbsp;&nbsp;ErrorLog \u201dlogs\/dummy-host2.localhost-error.log\u201d<br \/>&nbsp;&nbsp;&nbsp;&nbsp;CustomLog \u201dlogs\/dummy-host2.localhost-access.log\u201d common<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory \u201dC:\/PhpDocRoot\/Site2\u2033&gt;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes FollowSymLinks<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&#114;der allow,deny<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/Directory&gt;<br \/>&lt;\/VirtualHost&gt;<br \/>&lt;Directory\u2026&gt;\u2026&lt;\/Directory&gt;\u4e00\u5b9a\u4e0d\u80fd\u5c11<br \/>\u91cd\u65b0\u542f\u52a8apache\u8bd5\u4e00\u4e0b\uff0c\u5982\u679c\u51fa\u9519\uff0c\u67e5\u770b\u4e00\u4e0blogs\u4e0b\u9762\u7684log\u6587\u4ef6\u8fd8\u6709windows\u7684\u4e8b\u4ef6\u67e5\u770b\u5668\u8bb0\u5f55\u7684\u9519\u8bef\u65e5\u5fd7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6ehttpd.conf \u76d1\u542c\u591a\u4e2a\u7aef\u53e3# Listen: Allow&#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":[18],"tags":[],"class_list":["post-472","post","type-post","status-publish","format-standard","hentry","category-Php"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/472","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=472"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/472\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}