title: SimpleSAMLphp redirect back with wrong hostname
body: <p>I have an application at url like <code>https://mytestapp.domain</code>
  Have there installed SimpleSAMLphp <code>https://mytestapp.domain/simplesaml</code></p>
  
  <p>When I want to log in I am redirected to SAML server where I can fill username and password. Then I am redirected back to my app.</p>
  
  <p>Problem is that I am redirected to <code>https://&lt;ip_of_my_server&gt;/simplesaml/module.php/saml/sp/discoresp.php...</code> but I need hostname in url (<code>https://mytestapp.domain/simplesaml/module.php/saml/sp/discoresp.php...</code>)</p>
  
  <p>In SAML request I have </p>
  
  <pre><code>&lt;saml:Issuer&gt;https://&lt;ip_of_my_server&gt;/simplesaml/module.php/saml/sp/metadata.php/...&lt;/saml:Issuer&gt;
  
  AssertionConsumerServiceURL="https://&lt;ip_of_my_server&gt;/simplesaml/module.php/saml/sp/saml2-acs.php/..."
  </code></pre>
  
  <p>But</p>
  
  <pre><code>entityID="https://mytestapp.domain/simplesaml/module.php/saml/sp/metadata.php/..."
  </code></pre>
  
  <p>and baseurl is also filled with hostname <code>https://mytestapp.domain...</code></p>
  
  <p>Can somebody direct me where I should change IP to hostname?</p>
  
  <hr>
  
  <p><strong>Edit 1</strong></p>
  
  <p>mytestapp.domain/simplesaml/admin/hostnames.php as Lisa suggested is 404 Not Found (maybe some older version on my server (it looks like it is 1.11)</p>
  
  <p>In config.php I have </p>
  
  <pre><code>$config = array(
  //...
  'baseurlpath' =&gt; 'https://' . $currentHost . '/simplesaml/',
  //...
  );
  </code></pre>
  
  <p>where <code>$currentHost</code> is result of getting <code>HTTP_X_FORWARDED_HOST</code> or <code>HTTP_HOST</code> and it is filled with <code>mytestapp.domain</code></p>