I suppose it was clear WHAT YOU WANT and HOW YOU WANT IT from the beginning.
You want to host 3 'independent' sites, each with his domain-name, on one IP, using different ports to differentiate them.
If you understand that to differentiate the sites, there is no need to use a domainname AND a port for each site, there are two approaches to get WHAT you want.
1. You can differentiate your sites on template-level with macros, using the domain-name: Each request to HFS comes with a header, the 'host' element in this header looks normally like:
localhost:80 or domain1.godaddy.com:80
(or only localhost or domain1.godaddy.com, as port 80 is default) or
127.0.0.1:1337 or your.domain2.inf:1337 or
192.168.1.3:8080 or yourdomain3.com
or (your external ip) 65.72.nn.mm(:port) With the help of this header and macro you can enforce access to the folders you want WITHOUT using different ports!
2. You could - theoretically - differentiate your sites on HFS program level, using the port number. But why then use different domain names? And actually HFS does not support this feature (quite useless, except for your special HOW I want it)
Each of the two methods have some drawbacks - even the method you want, as you will see.
- to be sure that users access to the site you want, you must ensure that they use your.domain1.com(:port) and not 65.72.nn.mm(:port), because as many domainnames point to the same IP, which any user can get, your site on port 80 is always exposed if somebody uses the ip and default port. The only way to avoid this, is to test the host-string in the request-header and then no port information is needed!
- if you would rely on ports, then every user who drops the port number from the url would finish on the site that is on port 80 !
- without using different ports, you have 3 local ways (localhost - 127.0.0.1 - 192-168.x.y) and 1 numeric external way and as many external ways as you have assigned domains to your IP. This is perfectily usable, so that the 3 local forms point to the same 'site' as the domainnames, and i recomend to use the external numeric way to point to a dummy page that does not reveal the existence of the other sites.
Take a look on the macro syntax in the wiki, then take another look at mi first post of this thread.
If you don't see then, that WHAT you want, can be done this way, and because it is not HOW you want it, then the only solution for you will be to start three instances of hfs (by the way: the best solution to migrate sites!
) - but with the same drawback of defaultport site if you do not check header-host in the templates!
By the way: I am hosting this way two sites (with two domains) and the generic site (if accessed with ip instead of url), each with his own folders and files, and even with different template-design.