title: Multi-site application gateway path-based routing not sending traffic to Apache on VMs
body: <p>In Azure Application Gateway (standard tier), I have a couple of multi-site listeners:</p>
  
  <p><strong>listener-one-http (80 with hostname www.staging.example.com )</strong>
  The basic rule sends traffic to the following listener:</p>
  
  <p><strong>listener-two-https (443 with hostname www.staging.example.com )</strong>
  This path-based rule sends traffic to VM-01 or VM-02 if path contains "mystore". Apache is configured on both these VMs for different sites.</p>
  
  <p>Path-based rules are:</p>
  
  <pre><code>Name: www.staging.example.com-https-rule
  Listener: listener-two-https
  Backend pool: VM-01-Pool
  Default HTTP settings: HTTPS-Backend
  
  Name, Paths, Backend pool, HTTP setting
  store, /mystore/*, VM-02-Pool, HTTPS-Backend
  all, /*, VM-01-Pool, HTTPS-Backend
  </code></pre>
  
  <p>The basic rule is being enforced (http to https) but the path-based rule set appears to be ignored. In my browser, I enter <a href="http://www.staging.example.com" rel="nofollow noreferrer">http://www.staging.example.com</a> and this results in <a href="https://www.staging.example.com" rel="nofollow noreferrer">https://www.staging.example.com</a> (good) but then I get the following message (bad):</p>
  
  <pre><code>You don't have permission to access / on this server.
  </code></pre>
  
  <p>Is there a way to trace what's happening between the application gateway and Apache without checking on the VMs? </p>