Difference between revisions of "Apache/Proxy"

From braindump
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE: Apache mod_proxy recipies}} == Recipies == === IPv6 enable a IPv4 only site with reverse proxying === ==== Prerequisites ==== * mod_proxy is loaded * mod_h...")
 
Line 3: Line 3:
== Recipies ==
== Recipies ==


=== IPv6 enable a IPv4 only site with reverse proxying ===
=== IPv6 enable an IPv4 only site with reverse proxying ===
==== Prerequisites ====
==== Prerequisites ====
* mod_proxy is loaded
* mod_proxy is loaded

Revision as of 20:28, 30 April 2015


Recipies

IPv6 enable an IPv4 only site with reverse proxying

Prerequisites

  • mod_proxy is loaded
  • mod_http_proxy is loaded
  • An AAAA record in DNS with the same name as the website
  • An A record in DNS like ipv4.<domain> pointing the same IP as the website.
<VirtualHost [2a01::d0:d0]:80>
  ServerName  bun.ch
  ServerAlias www.bun.ch
  LogLevel warn
  ErrorLog /var/log/apache2/bun.ch-ipv6-proxy.error.log
  CustomLog /var/log/apache2/bun.ch-ipv6-proxy.access.log combined
  <IfModule mod_proxy.c>
    ProxyRequests On 
    <Proxy http://ipv4.bun.ch/*>
      Order deny,allow
      Allow from all
      ProxySet connectiontimeout=5 timeout=30 
    </Proxy> 
    <LocationMatch "/">
      ProxyPass        http://ipv4.bun.ch/
      ProxyPassReverse http://ipv4.bun.ch/
    </LocationMatch> 
  </IfModule>
</VirtualHost>