title: Can I both use ProxyPreserveHost and RequestHeader set Host in Apache VirtualHost?
body: <p>I am trying to set the host in the request header to "server2" for when ProxyPass directs the request to server2 but preserve the host in all other cases (when it passes it to server1).</p>
  
  <pre><code>&lt;Proxy "/path1"&gt;
    RequestHeader set Host server2
  &lt;/Proxy&gt;
  ProxyPass         /path1  http://server2/path1
  ProxyPassReverse  /path1  http://server2/path1
  
  ProxyPreserveHost      On
  ProxyPass         /    http://server1/
  </code></pre>
  
  <p>Is there a way to have ProxyPreserveHost on Off for incoming urls starting with /path1 but have it on On for all other urls? Or change the Host in the RequestHeader as i tried in the above code sample (which didn't work).</p>
  
  <p>I am using Apache version 2.2.22 on Ubuntu 12.04</p>