Run behind Apache httpd reverse proxyre

Octopus Server doesn’t seem to calculate the URLs correctly… binding to a private IP on port 9999, using apache virtual host to reverse proxy from https to http://hostname:9999.

2020-03-02 14:15:29.3806   7384     19 ERROR  Unhandled exception from web server processing GET to Unable to locate base URI for request:
   at Octopus.Server.Web.OctopusNancyHost.ConvertRequestToNancyRequest(HttpListenerRequest request) in OctopusNancyHost.cs:line 304
   at Octopus.Server.Web.OctopusNancyHost.HandleRequest in OctopusNancyHost.cs:line 176
System.InvalidOperationException: Unable to locate base URI for request:
   at Octopus.Server.Web.OctopusNancyHost.ConvertRequestToNancyRequest(HttpListenerRequest request) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\OctopusNancyHost.cs:line 304
   at Octopus.Server.Web.OctopusNancyHost.<HandleRequest>d__21.MoveNext() in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\OctopusNancyHost.cs:line 176
<octopus-settings xmlns:xsd="" xmlns:xsi="">
  <set key="Octopus.Communications.ServicesPort">10943</set>
  <set key="Octopus.Home">C:\Octopus</set>
  <set key="Octopus.Server.NodeName"></set>
  <set key="Octopus.WebPortal.ForceSsl">false</set>
  <set key="Octopus.WebPortal.ListenPrefixes"></set>
    Redirect "/" ""

	ProxyRequests       Off
	ProxyPreserveHost   On
	ProxyPass "/"  ""
	ProxyPassReverse "/"  ""
	SSLEngine on
    SSLCertificateFile "${SRVROOT}/ssl/"
    SSLCertificateKeyFile "${SRVROOT}/ssl/"

Changing ProxyPreserveHost to Off in the vhosts file fixed it.

1 Like

Hi @mmorgan6,

Thanks for the update and resolution! I’m glad to hear that you got this working.

If you have any further thoughts or questions in the future, please don’t hesitate to get in touch.

Best regards,

1 Like