{"id":232,"date":"2018-06-20T07:04:00","date_gmt":"2018-06-19T23:04:00","guid":{"rendered":"https:\/\/yeslq.com\/201806232.html"},"modified":"2019-05-07T10:38:34","modified_gmt":"2019-05-07T02:38:34","slug":"apacheip","status":"publish","type":"post","link":"https:\/\/yeslq.com\/?p=232","title":{"rendered":"Apache\u8bbe\u7f6e\u7981\u6b62\u901a\u8fc7IP\u8bbf\u95ee\u7f51\u7ad9"},"content":{"rendered":"<p>\n\u4ee5Apache\u4e3a\u4f8b<\/p>\n<p>\u901a\u5e38\u5927\u5bb6\u90fd\u5e0c\u671b\u7528\u6237\u901a\u8fc7\u57df\u540d\u6765\u8bbf\u95ee\u7f51\u7ad9\uff0c\u6240\u4ee5\u9700\u8981\u7981\u6b62\u7528\u6237\u901a\u8fc7IP\u5730\u5740\u6765\u8bbf\u95ee<\/p>\n<p>\u8fd9\u6837\u5c31\u9700\u8981\u8bbe\u7f6eApache\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u5728CentOS 6\u4e0b\u5b89\u88c5Apache<\/p>\n<p>yum install httpd \u5373\u53ef\uff0c\u5982\u679c\u9700\u8981\u4f7f\u7528php\u90a3\u5c31\u5728\u539f\u6709\u547d\u4ee4\u540e\u6dfb\u52a0php<\/p>\n<p>\u5373\uff1ayum install httpd php<\/p>\n<p>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8&nbsp; chkconfig httpd on<br \/>\n\u542f\u52a8Apache\u670d\u52a1&nbsp; service httpd start<br \/>\n\u5b89\u88c5\u540e\uff0c\u5728\/var\/www\/html \u76ee\u5f55\u4e0b\u521b\u5efa\u7f51\u7ad9\u6587\u4ef6\u5c31\u53ef\u4ee5\u8bbf\u95ee\u4e86<\/p>\n<p>\n\u7981\u6b62IP\u8bbf\u95ee\u7f51\u7ad9\u9700\u8981\u4fee\u6539Apache\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>&nbsp;vi&nbsp; \/etc\/httpd\/conf\/httpd.conf<\/p>\n<p>\u5728\u6700\u540e\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p>\nNameVirtualHost 123.123.123.123<br \/>\n&lt;VirtualHost 123.123.123.123&gt;<br \/>\nServerName 123.123.123.123<br \/>\n&lt;Location \/&gt;<br \/>\nOrder Allow,Deny<br \/>\nDeny from all<br \/>\n&lt;\/Location&gt;<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n#&#8212;&#8212;\u4ee5\u4e0a\u8868\u793a\u7981\u6b62\u901a\u8fc7IP\u5730\u5740\u4e3a 123.123.123.123 \u6765\u8bbf\u95ee\u672c\u7ad9<\/p>\n<p>&lt;VirtualHost 123.123.123.123&gt;<br \/>\nDocumentRoot &#8220;\/var\/www\/html&#8221;<br \/>\nServerName test.test.com<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p>#&#8212;&#8212;\u4ee5\u4e0a\u5185\u5bb9\u8868\u793a\u53ea\u80fd\u901a\u8fc7test.test.com\u57df\u540d\u6765\u8bbf\u95ee\u7f51\u7ad9\uff0c\u5176\u5b83\u57df\u540d\u65e0\u6cd5\u8bbf\u95ee<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5Apache\u4e3a\u4f8b \u901a\u5e38\u5927\u5bb6\u90fd\u5e0c\u671b\u7528\u6237\u901a\u8fc7\u57df\u540d\u6765\u8bbf\u95ee\u7f51\u7ad9\uff0c\u6240\u4ee5\u9700\u8981\u7981\u6b62\u7528\u6237\u901a\u8fc7IP\u5730\u5740\u6765\u8bbf\u95ee \u8fd9\u6837\u5c31\u9700\u8981\u8bbe\u7f6eA &#8230; <a title=\"Apache\u8bbe\u7f6e\u7981\u6b62\u901a\u8fc7IP\u8bbf\u95ee\u7f51\u7ad9\" class=\"read-more\" href=\"https:\/\/yeslq.com\/?p=232\" aria-label=\"\u9605\u8bfb Apache\u8bbe\u7f6e\u7981\u6b62\u901a\u8fc7IP\u8bbf\u95ee\u7f51\u7ad9\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[75,64,65,51],"class_list":["post-232","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-apache","tag-centos","tag-ip","tag-linux"],"_links":{"self":[{"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yeslq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=232"}],"version-history":[{"count":1,"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/yeslq.com\/index.php?rest_route=\/wp\/v2\/posts\/232\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/yeslq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yeslq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yeslq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}