{"id":337,"date":"2010-04-18T21:06:18","date_gmt":"2010-04-18T21:06:18","guid":{"rendered":""},"modified":"2010-04-18T21:06:18","modified_gmt":"2010-04-18T21:06:18","slug":"337","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=337","title":{"rendered":"\u914d\u7f6eapache2\u7684\u865a\u62df\u4e3b\u673a"},"content":{"rendered":"<p>ubuntu\u7684apache2+php5+mysql5\u7684\u73af\u5883\u914d\u7f6e\u597d\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528eclipsephp\u6765\u8fdb\u884c\u5f00\u53d1\u4e86\u3002 <br \/>\u5728\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u96be\u514d\u8981\u8fdb\u884c\u670d\u52a1\u5668\u6d4b\u8bd5\uff0c\u4e0d\u80fd\u603b\u662f\u4f20\u9001\u5230 web\u670d\u52a1\u5668\u53bb\u6d4b\u8bd5\u6548\u679c\u963f\u3002\u5e76\u4e14eclipsephp\u6ca1\u6709zendstudio\u7b49\u7b49\u90a3\u79cd\u9884\u89c8\u6548\u679c\u3002\u6240\u4ee5\u6709\u5fc5\u8981 \u914d\u7f6e\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\u6765\u4f7f\u7528\u3002 \u9ed8\u8ba4\u768480\u7aef\u53e3\u5bf9\u5e94\/var\/www\/\u6240\u4ee5\u8fd9\u4e2a\u4e0d\u6539\u4e86\uff0c\u6211\u7684\u505a\u6cd5\u662f\u542f\u7528\u4e00\u4e2a\u65b0\u7684\u7aef\u53e3\u300288\u7aef\u53e3\u5bf9\u5e94\/home\/tom\/workspace\/ eclipsephp\u7684\u5de5\u4f5c\u533a\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u5b9e\u65f6\u7684\u67e5\u770b\u6700\u65b0\u7684\u9875\u9762\u6548\u679c\u4e86\u3002<\/p>\n<p>1. \u4fee\u6539 \/etc\/apache2\/ports.conf \u6587\u4ef6\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u76d1\u542c\u7aef\u53e3<br \/>Listen 80<br \/>Listen 88 \/\/\u6211\u589e\u52a0\u7684\u3002<\/p>\n<p>2. \u5728 sites-available\/ \u76ee\u5f55\u4e0b\u521b\u5efa\u65b0\u7684\u6587\u4ef6localhost-88 \u5e76\u5199\u5165\u4e0b\u9762\u7684\u914d\u7f6e<br \/>\u4e0b\u9762\u8d34\u51fa\u6211\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u4ee3\u7801\uff1a<br \/><code><br \/>&lt;VirtualHost localhost:88&gt;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u7ed1\u5b9a\u7aef\u53e3<br \/>&#160;&#160;&#160;&#160;ServerAdmin webmaster@localhost<\/p>\n<p>&#160;&#160;&#160;&#160;DocumentRoot \/home\/tom\/workspace\/<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/\u7ed1\u5b9a\u76ee\u5f55\/\/\u6ce8\u610f\u6743\u9650<br \/>&#160;&#160;&#160;&#160;&lt;Directory \/&gt;<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Options FollowSymLinks<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;AllowOverride None<br \/>&#160;&#160;&#160;&#160;&lt;\/Directory&gt;<br \/>&#160;&#160;&#160;&#160;&lt;Directory \/home\/tom\/workspace\/&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/\u7ed1\u5b9a\u76ee\u5f55\/\/\u6ce8\u610f\u6743\u9650<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Options Indexes FollowSymLinks MultiViews<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;AllowOverride None<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;o&#114;der allow,deny<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;allow from all<br \/>&#160;&#160;&#160;&#160;&lt;\/Directory&gt;<\/p>\n<p>&#160;&#160;&#160;&#160;ScriptAlias \/cgi-bin\/ \/usr\/lib\/cgi-bin\/<br \/>&#160;&#160;&#160;&#160;&lt;Directory \"\/usr\/lib\/cgi-bin\"&gt;<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;AllowOverride None<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;o&#114;der allow,deny<br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Allow from all<br \/>&#160;&#160;&#160;&#160;&lt;\/Directory&gt;<\/p>\n<p>&#160;&#160;&#160;&#160;ErrorLog \/var\/log\/apache2\/error.log<\/p>\n<p>&#160;&#160;&#160;&#160;# Possible values include: debug, info, notice, warn, error, crit,<br \/>&#160;&#160;&#160;&#160;# alert, emerg.<br \/>&#160;&#160;&#160;&#160;LogLevel warn<\/p>\n<p>&#160;&#160;&#160;&#160;CustomLog \/var\/log\/apache2\/access.log combined<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;Alias \/doc\/ \"\/usr\/share\/doc\/\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory \"\/usr\/share\/doc\/\"&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes MultiViews FollowSymLinks<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o&#114;der deny,allow<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deny from all<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from 127.0.0.0\/255.0.0.0 ::1\/128<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/Directory&gt;<\/p>\n<p>&lt;\/VirtualHost&gt;<br \/><\/code><\/p>\n<p>3. \u4f7f\u7528 a2ensite \u547d\u4ee4\u542f\u7528\u865a\u62df\u4e3b\u673a<\/p>\n<p>sudo a2ensite localhost-88<\/p>\n<p>4. \u91cd\u65b0\u542f\u52a8 Apache<\/p>\n<p>sudo \/etc\/init.d\/apache2 restart<\/p>\n<p>\u81f3\u6b64\u670d\u52a1\u5668\u57fa\u4e8e\u7aef\u53e3\u7684\u865a\u62df\u4e3b\u673a\u5c31\u8bbe\u7f6e\u597d\u4e86\u3002 <br \/>\u4f60\u53ef\u4ee5\u901a\u8fc7<a href=\"http:\/\/localhost:88\" target=\"_blank\" rel=\"external\">http:\/\/localhost:88<\/a> \u6765\u8bbf\u95ee\u4f60\u7684\u65b0\u9879\u76ee\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu\u7684apache2+php5+mysql5\u7684\u73af\u5883\u914d\u7f6e\u597d\u4e4b\u540e&#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":[17],"tags":[],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-Linux"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/337","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=337"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/337\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}