0

I would like to create 3 different sites on my dev PC each with its own root directory which running different version of PHP And I would like to have unique domain for them

Lets say my Default Website would be localhost with * :80 and * :443 binding (this is running PHP 5.6.2 x64) (Path: C:\inetpub\wwwroot)

The second site would be localsecure with * :444 binding (this would running PHP 5.4.34 x86) (Path: C:\inetpub\wwwsecure)

The third site would be localold with * :81 binding (this would run PHP 5.3.29 x86) (Path: C:\inetpub\wwwold)

I tried to set up the three site with the bindings above and than added 127.0.0.1:81 and :444 to my hosts file with the desired name but I only get Page Can't be displayed error, and of course it works if I type in 127.0.0.1:444 or localhost:444

How can I set up these three sites?

0

Ok, I figured out. I add this answer because it could help others who are trying to do something like this

So first of all I realised how stupid I was because you can not define port number in the hosts file.

Than I edited my hosts file like this:

127.0.0.1 localhost
127.0.0.1 localsecure
127.0.0.1 localold

After this I edited the bindings in IIS like this

Default Website: http: * :80 localhost
Default Website: https: * :443 localhost
Secure Website: https: * :443 localsecure
Old Website: http: * :80 localold

And of course in the PHP Manger I set the desired PHP version

Now it works as expected

I hope it will help someone.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.