title: Laravel routes behind reverse proxy
body: <p>Ok, so for development purposes, we have a dedicated web server. It's not currently connected directly to the internet, so I've setup an apache reverse proxy on another server, which forwards to the development server.</p>
  
  <p>This way, I can get web access to the server.</p>
  
  <p>The problem is, the routes in Laravel are now being prefixed with the internal server IP address, or the servers computer name.</p>
  
  <p>For example, I go to <a href="http://subdomain.test.com">http://subdomain.test.com</a> but all the routes, generated using the <code>route()</code> helper, are displaying the following url: <code>http://10.47.32.22</code> and not <code>http://subdomain.test.com</code>.</p>
  
  <p>The reverse proxy is setup as such:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName igateway.somedomain.com
  
      ProxyRequests Off
      &lt;Proxy *&gt;
          Order deny,allow
          Allow from all
      &lt;/Proxy&gt;
  
      ProxyPass / http://10.47.32.22:80/
      ProxyPassReverse / http://10.47.32.22:80/
      &lt;Location /&gt;
          Order allow,deny
          Allow from all
      &lt;/Location&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I have set the actual domain name in <code>config\app.php</code>. </p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I set the default URL to use in routing? I don't want it using the internal addresses, because that defeats the point of the reverse proxy. </p>
  
  <p>I've tried enclosing all my routes in a <code>Route::group(['domain' ...</code> group, which doesn't work either.</p>