{"id":1133,"date":"2009-09-14T22:35:22","date_gmt":"2009-09-15T03:35:22","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1133"},"modified":"2009-09-14T22:36:16","modified_gmt":"2009-09-15T03:36:16","slug":"apache-2-mod_proxy","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1133","title":{"rendered":"Apache 2 mod_proxy"},"content":{"rendered":"<span id=\"mod_proxy_related_modules\"><h2>mod_proxy related modules<\/h2><\/span>\n<p>* mod_proxy: The core module deals with proxy infrastructure and configuration and managing a proxy request.<br \/>\n* mod_proxy_http: This handles fetching documents with HTTP and HTTPS.<br \/>\n* mod_proxy_ftp: This handles fetching documents with FTP.<br \/>\n* mod_proxy_connect: This handles the CONNECT method for secure (SSL) tunneling.<br \/>\n* mod_proxy_ajp: This handles the AJP protocol for Tomcat and similar backend servers.<br \/>\n* mod_proxy_balancer implements clustering and load-balancing over multiple backends.<br \/>\n* mod_cache, mod_disk_cache, mod_mem_cache: These deal with managing a document cache. To enable caching requires mod_cache and one or both of disk_cache and mem_cache.<br \/>\n* mod_proxy_html: This rewrites HTML links into a proxy&#8217;s address space.<br \/>\n* mod_headers: This modifies HTTP request and response headers.<br \/>\n* mod_deflate: Negotiates compression with clients and backends.<\/p>\n<span id=\"Install_mod_proxy_html\"><h2>Install mod_proxy_html<\/h2><\/span>\n<p>mod_proxy_html is not included with Apache core so needs to be installed separately.<br \/>\n* Download <a href=\"http:\/\/www.apachelounge.com\/download\/mods\/mod_proxy_html-3.0.1-w32.zip\">mod_proxy_html-3.0.1-w32.zip<\/a> from <a href=\"http:\/\/www.apachelounge.com\/download\/\">apachelounge.com<\/a>.<br \/>\n* Extract mod_proxy_html folder onto Apache modules directory.<br \/>\n* Download and install Visual C++ 2008 Redistributable Package <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&#038;displaylang=en\">vcredist_x86.exe<\/a><br \/>\n* Edit <em>modules\/mod_proxy_html\/proxy_html.conf<\/em> file to include:<\/p>\n<pre>\r\n# May also need zlib.dll and iconv.dll\r\nLoadFile modules\/mod_proxy_html\/libxml2.dll\r\nLoadModule  proxy_html_module modules\/mod_proxy_html\/mod_proxy_html.so\r\n<\/pre>\n<p>* Add to httpd.conf<\/p>\n<pre>\r\nInclude modules\/mod_proxy_html\/proxy_html.conf\r\n<\/pre>\n<span id=\"Setup_Reverse_Proxy\"><h2>Setup Reverse Proxy<\/h2><\/span>\n<pre lang=\"xml\">\r\nLoadModule proxy_module      modules\/mod_proxy.so\r\nLoadModule proxy_http_module modules\/mod_proxy_http.so\r\nLoadModule headers_module    modules\/mod_headers.so\r\n\r\n# If using mod_proxy_html\r\n#Include modules\/mod_proxy_html\/proxy_html.conf\r\n\r\n<IfModule proxy_module>\r\n  ProxyRequests Off\r\n\r\n  <Proxy *>\r\n  Order deny,allow\r\n  Allow from all\r\n  <\/Proxy>\r\n\r\n  # http:\/\/www.my.com\/app1\/ will be served from http:\/\/internal.my.com:8080\/\r\n  ProxyPass \/app1\/ http:\/\/internal.my.com:8080\/\r\n\r\n  # http:\/\/internal.my.com:8080\/ urls will be converted to http:\/\/www.my.com\/app1\/\r\n  # so users don't know the content is served from http:\/\/internal.my.com:8080\/\r\n  ProxyPassReverse \/app1\/ http:\/\/internal.my.com:8080\/ \r\n\r\n  # If using mod_proxy_html\r\n  #ProxyHTMLURLMap http:\/\/internal.my.com:8080 \/app1 # No tailing slash\r\n  #<Location \/app1\/>\r\n  #  ProxyPassReverse \/\r\n  #  SetOutputFilter  proxy-html\r\n  #  ProxyHTMLURLMap  \/      \/app1\/\r\n  #  ProxyHTMLURLMap  \/app1  \/app1\r\n  #  RequestHeader    unset  Accept-Encoding\r\n  #<\/Location>\r\n\r\n<\/IfModule>\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p><a href=\"http:\/\/www.apachetutor.org\/admin\/reverseproxies\">http:\/\/www.apachetutor.org\/admin\/reverseproxies<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>mod_proxy related modules * mod_proxy: The core module deals with proxy infrastructure and configuration and managing a proxy request. * mod_proxy_http: This handles fetching documents with HTTP and HTTPS. * mod_proxy_ftp: This handles fetching documents with FTP. * mod_proxy_connect: This &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1133\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[21],"tags":[],"class_list":["post-1133","post","type-post","status-publish","format-standard","hentry","category-apache"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-ih","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1133"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1137,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1133\/revisions\/1137"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}