Use the port number from the URL

- http://www.somewhere.com:8001/somepath should work properly now