{"id":23,"date":"2007-09-22T15:21:00","date_gmt":"2007-09-22T07:21:00","guid":{"rendered":"http:\/\/blog.pighead.cc\/whsyu\/2007\/09\/22\/23\/"},"modified":"2010-01-22T17:01:52","modified_gmt":"2010-01-22T09:01:52","slug":"apache-mod_proxy","status":"publish","type":"post","link":"https:\/\/blog.pighead.cc\/whsyu\/2007\/09\/22\/apache-mod_proxy\/","title":{"rendered":"Apache \u7684 mod_proxy"},"content":{"rendered":"<p class=\"bb-post-separator\"><strong>[\u83ef\u8a9e, cmn-Hant-TW]  <\/strong><\/p><p>\u7528 mod_rewrite \u53ef\u4ee5\u89e3\u6c7a\u6389\u5927\u534a\u5728\u540c\u4e00\u53f0\u4f3a\u670d\u5668\u4e0a\u8f49\u4f86\u8f49\u53bb\u7684\u554f\u984c\uff0c\u800c\u56e0\u70ba\u6211\u5011\u5927\u90e8\u4efd\u7684\u7db2\u9801\u90fd\u662f\u653e\u5728<a href=\"http:\/\/pighead.cc\">\u540c\u4e00\u53f0\u6a5f\u5668<\/a>\u540c\u4e00\u500b\u7db2\u5740\u4e0b\u9762\uff0c\u4e00\u5207\u904b\u4f5c\u6b63\u5e38\u3002<\/p>\n<p>\u4e0d\u904e\u5728\u5e6b<a href=\"http:\/\/www.vinny.idv.tw\">\u738b\u97cb\u4e2d<\/a>\u505a\u8f49\u5740\u7684\u6642\u5019\u5c31\u6709\u8f49\u5230\u5916\u9762\u6a5f\u5668\u7684\u9700\u6c42\uff0c\u800c\u5982\u679c\u7528 mod_rewrite \u7684\u8a71\u5916\u90e8\u8f49\u5740\u662f\u6703\u7528\u8f49\u5411 (redirect) \u7684\u65b9\u5f0f\uff0c\u90a3\u7db2\u5740\u6703\u8dd1\u5230\u90a3\u908a\u53bb\uff0c\u9019\u6a23\u4e26\u4e0d\u7b26\u5408\u9700\u6c42\u3002<\/p>\n<p>\u7db2\u8def\u4e0a\u627e\u4e86\u627e\uff0c\u627e\u5230\u4e86<a href=\"http:\/\/mail-archives.apache.org\/mod_mbox\/httpd-users\/200301.mbox\/%3c!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAC5B4UawN1hGCdQBIVF6f8cKAAAAQAAAAmWtN+d99EkOQmo+RE5DG9AEAAAAA@verbocht.be%3e\">\u9019\u7bc7<\/a>\u548c<a href=\"http:\/\/chitsaou.wordpress.com\/2007\/07\/17\/apache-mongrel-ror\/\">\u9019\u7bc7<\/a>\uff0c\u770b\u4f86\u7528 PorxyPass \u4f86\u8f49\u5740\u61c9\u8a72\u5c31\u53ef\u4ee5\u4e86\uff0c\u7136\u5f8c\u6211\u5011\u7684 apache \u7576\u7136\u662f\u6c92\u6709\u52a0 mod_proxy \u5566\uff0c\u91cd\u7de8\u5c31\u89e3\u6c7a\u4e86\u3002<\/p>\n<p>\u7136\u5f8c\u5728 httpd.conf \u88e1\u9762\u52a0\u4e86\u9019\u884c\uff1a<\/p>\n<pre lang=\"null\">LoadModule proxy_module libexec\/apache22\/mod_proxy.so<\/pre>\n<p>\u7d50\u679c\u5403\u4e86\u500b 403\uff0c\u770b\u4e86\u4e00\u4e0b log \u767c\u73fe\u4e86\u9019\u500b\u8b66\u544a\uff1a<\/p>\n<pre lang=\"null\">[warn] proxy: No protocol handler was valid for the URL \/a. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule<\/pre>\n<p>\u597d\u5427\uff0c\u90a3\u53ea\u597d\u4e56\u4e56\u7684\u628a\u6771\u897f\u52a0\u4e0a\u53bb\u4e86<\/p>\n<pre lang=\"null\">LoadModule proxy_http_module libexec\/apache22\/mod_proxy_http.so<\/pre>\n<p>\u8a66\u4e86\u4e00\u4e0b\uff0c\u770b\u8d77\u4f86\u61c9\u8a72\u662f\u6c92\u5565\u592a\u5927\u554f\u984c\uff0c\u4e4b\u5f8c\u6709\u9700\u8981\u7684\u8a71\u5c31\u53ef\u4ee5\u76f4\u63a5\u7528\uff0c\u9806\u4fbf\u628a mod_proxy \u7684\u8a2d\u5b9a\u52a0\u9032 <a href=\"http:\/\/www.freshports.org\/sysutils\/portconf\/\">ports.conf<\/a> \u4ee5\u5f8c\u6607\u7d1a apache \u7684\u6642\u5019\u624d\u6703\u8a18\u5f97\u9806\u4fbf\u7de8\u8b6f\u597d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[\u83ef\u8a9e, cmn-Hant-TW] \u7528 mod_rewrite \u53ef\u4ee5\u89e3\u6c7a\u6389\u5927\u534a\u5728\u540c\u4e00\u53f0\u4f3a\u670d\u5668\u4e0a\u8f49\u4f86\u8f49\u53bb\u7684\u554f\u984c\uff0c\u800c\u56e0\u70ba\u6211\u5011\u5927\u90e8\u4efd\u7684\u7db2\u9801\u90fd\u662f\u653e\u5728\u540c\u4e00\u53f0\u6a5f\u5668\u540c\u4e00\u500b\u7db2\u5740\u4e0b\u9762\uff0c\u4e00\u5207\u904b\u4f5c\u6b63\u5e38\u3002 \u4e0d\u904e\u5728\u5e6b\u738b\u97cb\u4e2d\u505a\u8f49\u5740\u7684\u6642\u5019\u5c31\u6709\u8f49\u5230\u5916\u9762\u6a5f\u5668\u7684\u9700\u6c42\uff0c\u800c\u5982\u679c\u7528 mod_rewrite \u7684\u8a71\u5916\u90e8\u8f49\u5740\u662f\u6703\u7528\u8f49\u5411 (redirect) \u7684\u65b9\u5f0f\uff0c\u90a3\u7db2\u5740\u6703\u8dd1\u5230\u90a3\u908a\u53bb\uff0c\u9019\u6a23\u4e26\u4e0d\u7b26\u5408\u9700\u6c42\u3002 \u7db2\u8def\u4e0a\u627e\u4e86\u627e\uff0c\u627e\u5230\u4e86\u9019\u7bc7\u548c\u9019\u7bc7\uff0c\u770b\u4f86\u7528 PorxyPass \u4f86\u8f49\u5740\u61c9\u8a72\u5c31\u53ef\u4ee5\u4e86\uff0c\u7136\u5f8c\u6211\u5011\u7684 apache \u7576\u7136\u662f\u6c92\u6709\u52a0 mod_proxy \u5566\uff0c\u91cd\u7de8\u5c31\u89e3\u6c7a\u4e86\u3002 \u7136\u5f8c\u5728 httpd.conf \u88e1\u9762\u52a0\u4e86\u9019\u884c\uff1a LoadModule proxy_module libexec\/apache22\/mod_proxy.so \u7d50\u679c\u5403\u4e86\u500b 403\uff0c\u770b\u4e86\u4e00\u4e0b log \u767c\u73fe\u4e86\u9019\u500b\u8b66\u544a\uff1a [warn] proxy: No protocol handler was valid for the URL \/a. If you&hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[13,182,181],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-apache","tag-mod_proxy","tag-mod_rewrite"],"_links":{"self":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":649,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/23\/revisions\/649"}],"wp:attachment":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}