{"id":288933,"date":"2023-12-15T05:11:19","date_gmt":"2023-12-14T21:11:19","guid":{"rendered":"https:\/\/lrxjmw.cn\/lzmazabgdlxa.html"},"modified":"2023-12-15T05:11:19","modified_gmt":"2023-12-14T21:11:19","slug":"lzmazabgdlxa","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lzmazabgdlxa.html","title":{"rendered":"linux\u600e\u4e48\u5b89\u88c5apache 7\u6b65\u641e\u5b9aLinux\u4e0b\u5b89\u88c5Apache\uff0c\u8f7b\u677e\u6253\u9020\u4f60\u7684Web\u670d\u52a1\u5668"},"content":{"rendered":"

\u5728Linux<\/a>\u7cfb\u7edf<\/a>\u4e2d\u5b89\u88c5Apache\u662f\u5efa\u7acb\u4e00\u4e2aWeb\u670d\u52a1\u5668\u7684\u7b2c\u4e00\u6b65\u3002\u4f5c\u4e3a\u4e00\u540d\u8d44\u6df1\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u6211\u5c06\u5206\u4eab\u6211\u591a\u5e74\u6765\u5728\u5b89\u88c5Apache\u65b9\u9762\u7684\u7ecf\u9a8c\u3002\u4ee5\u4e0b\u662f\u6211\u603b\u7ed3\u7684\u4e03\u4e2a\u6b65\u9aa4\uff0c\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u521d\u5b66\u8005\u3002<\/p>\n

1.\u51c6\u5907\u5de5\u4f5c\uff1a<\/b><\/p>\n

\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u767b\u5f55\u5230\u4f60\u7684Linux\u7cfb\u7edf\uff0c\u5e76\u5177\u6709root\u6743\u9650\u3002\u8fd8\u8981\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u5df2\u7ecf\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u4ee5\u4fbf\u4e0b\u8f7d\u548c\u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n

2.\u5b89\u88c5Apache\u8f6f\u4ef6\u5305\uff1a<\/b><\/p>\n

\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4<\/a>\u6765\u5b89\u88c5Apache\u8f6f\u4ef6\u5305\uff1a<\/p>\n

\u5b89\u88c5Apache\u670d\u52a1_\u5b89\u88c5Apache_linux\u600e\u4e48\u5b89\u88c5apache<\/p>\n

\n

\nsudo apt-get install apache2\n<\/pre>\n<\/p>\n

\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Apache\u3002<\/p>\n

3.\u542f\u52a8Apache\u670d\u52a1\uff1a<\/b><\/p>\n

\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8Apache\u670d\u52a1\uff1a<\/p>\n

\u5b89\u88c5Apache_linux\u600e\u4e48\u5b89\u88c5apache_\u5b89\u88c5Apache\u670d\u52a1<\/p>\n

\n

\nsudo systemctl start apache2\n<\/pre>\n<\/p>\n

\u8fd9\u4e2a\u547d\u4ee4\u5c06\u542f\u52a8Apache\u670d\u52a1\u5e76\u4f7f\u5176\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u542f\u52a8\u3002<\/p>\n

4.\u914d\u7f6e\u9632\u706b\u5899\uff1a<\/b><\/p>\n

\u4e3a\u4e86\u5141\u8bb8\u5916\u90e8\u8bbf\u95ee\u4f60\u7684Web\u670d\u52a1\u5668\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u9632\u706b\u5899\u4ee5\u5141\u8bb8HTTP\u6d41\u91cf\u901a\u8fc7\u3002\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u5f00\u653eHTTP\u7aef\u53e3\uff08\u9ed8\u8ba4\u4e3a80\uff09\uff1a<\/p>\n

\n

\nsudo ufw allow 80\n<\/pre>\n<\/p>\n

5.\u6d4b\u8bd5\u4f60\u7684Web\u670d\u52a1\u5668\uff1a<\/b><\/p>\n

\u6253\u5f00\u4f60\u7684Web\u6d4f\u89c8\u5668\uff0c\u5e76\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165\u4f60\u7684\u670d\u52a1\u5668\u7684IP\u5730\u5740\u3002\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u4f60\u5c06\u770b\u5230Apache\u9ed8\u8ba4\u7684\u6b22\u8fce\u9875\u9762\u3002<\/p>\n

6.\u914d\u7f6e\u865a\u62df\u4e3b\u673a\uff1a<\/b><\/p>\n

\u5b89\u88c5Apache\u670d\u52a1_linux\u600e\u4e48\u5b89\u88c5apache_\u5b89\u88c5Apache<\/p>\n

\u5982\u679c\u4f60\u60f3\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6258\u7ba1\u591a\u4e2a\u7f51\u7ad9\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u865a\u62df\u4e3b\u673a\u3002\u6253\u5f00\u7ec8\u7aef\u7a97\u53e3\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u4e3b\u673a\u6587\u4ef6\uff1a<\/p>\n

\n

\nsudo nano \/etc\/apache2\/sites-available\/.conf\n<\/pre>\n<\/p>\n

\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2dlinux\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5b9a\u4e49\u4f60\u7684\u865a\u62df\u4e3b\u673a\u7684\u914d\u7f6e\u4fe1\u606flinux\u600e\u4e48\u5b89\u88c5apache<\/strong>linux\u64cd\u4f5c\u7cfb\u7edf\u57f9\u8bad\uff0c\u5305\u62ec\u57df\u540d\u3001\u76ee\u5f55\u7b49\u3002\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u540e\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u542f\u7528\u65b0\u521b\u5efa\u7684\u865a\u62df\u4e3b\u673a\uff1a<\/p>\n

\n

\nsudo a2ensite .conf\n<\/pre>\n<\/p>\n

\u6700\u540e\uff0c\u91cd\u65b0\u52a0\u8f7dApache\u914d\u7f6e\uff1a<\/p>\n

\n

\nsudo systemctl reload apache2\n<\/pre>\n<\/p>\n

7.\u4f18\u5316\u6027\u80fd\uff1a<\/b><\/p>\n

\u4e3a\u4e86\u63d0\u9ad8Web\u670d\u52a1\u5668\u7684\u6027\u80fd\uff0c\u4f60\u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u4f18\u5316\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c\u542f\u7528\u7f13\u5b58\u3001\u4f7f\u7528\u538b\u7f29\u6280\u672f\u3001\u9650\u5236\u8bbf\u95ee\u9891\u7387\u7b49\u3002\u8fd9\u4e9b\u4f18\u5316\u63aa\u65bd\u53ef\u4ee5\u63d0\u9ad8Web\u9875\u9762\u7684\u52a0\u8f7d\u901f\u5ea6\u548c\u54cd\u5e94\u65f6\u95f4\u3002<\/p>\n

\u901a\u8fc7\u4ee5\u4e0a\u4e03\u4e2a\u6b65\u9aa4\uff0c\u4f60\u5df2\u7ecf\u6210\u529f\u5730\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86Apache\uff0c\u5e76\u4e14\u53ef\u4ee5\u5f00\u59cb\u642d\u5efa\u81ea\u5df1\u7684Web\u670d\u52a1\u5668\u4e86\u3002\u5e0c\u671b\u8fd9\u4e9b\u7ecf\u9a8c\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\u662f\u6709\u5e2e\u52a9\u7684\u3002\u5982\u679c\u4f60\u9047\u5230\u4efb\u4f55\u95ee\u9898linux\u600e\u4e48\u5b89\u88c5apache<\/strong>\uff0c\u8bf7\u968f\u65f6\u5411\u6211\u54a8\u8be2\u3002\u795d\u4f60\u597d\u8fd0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5Apache\u662f\u5efa\u7acb\u4e00\u4e2aWeb\u670d\u52a1\u5668\u7684\u7b2c\u4e00\u6b65\u3002\u8fd8\u8981\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u5df2\u7ecf\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u4ee5\u4fbf\u4e0b\u8f7d\u548c\u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8Apache\u670d\u52a1\uff1a\u901a\u8fc7\u4ee5\u4e0a\u4e03\u4e2a\u6b65\u9aa4\uff0c\u4f60\u5df2\u7ecf\u6210\u529f\u5730\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86Apache\uff0c\u5e76\u4e14\u53ef\u4ee5\u5f00\u59cb\u642d\u5efa\u81ea\u5df1\u7684Web\u670d\u52a1\u5668\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":288934,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-288933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=288933"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288933\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/288934"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=288933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=288933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=288933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}