title: Moodle 3.5 with Reverse proxy
body: <p>I'm having troubles setting up a moodle instance behind an apache proxy.</p>
  
  <p>Here's my apache front-end that proxies to the running server.</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName public.domain.com
  
  ProxyRequests Off
  ProxyPreserveHost On
  
  ProxyPass / http://10.10.10.10:81/moodle/
  ProxyPassReverse / http://10.10.10.10:81/moodle/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>AND. </p>
  
  <pre><code>$CFG-&gt;wwwroot = 'http://public.domain.com';
  </code></pre>
  
  <p>I install without problems, but when finished the installation I try in browser:</p>
  
  <p><a href="http://public.domain.com" rel="nofollow noreferrer">http://public.domain.com</a></p>
  
  <p>This redirect to: <a href="http://public.domain.com/moodle/index.php?sessionstarted=1&amp;lang=en" rel="nofollow noreferrer">http://public.domain.com/moodle/index.php?sessionstarted=1&amp;lang=en</a>...</p>
  
  <p>Does anyone know what might be happening?</p>