If you make use of the HOSTS file to allow the use of FQDN to remove the need for high port numbers on SharePoint 2007 installed on Windows Server 2003 with IE8 (that's the winner list...), you have an error HTTP 401.1 – Unauthorized: Logon Failed when you try to connect on the site.
This problem occurs because Windows includes a loopback check security feature that helps prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.
To solve the problem, you need to edit the registry (regedit), go to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 and add a new Multi-String Value named BackConnectionHostNames

You can now modify the value by adding your custom URL, one per line.

After restarting your computer, you should be able to access your website.