I am building a website and would not like to reconfigure the website from pointing to http://127.0.0.1
to http://www.example.com
. Furthermore, the certificate that I am using is of course made with the proper domain name of www.example.com
but my test environment makes calls to 127.0.0.1
which makes the security not work properly.
What I currently want to do is configure my development environment to assign the domain name www.example.com
to 127.0.0.1
so that all http://www.example.com/xyz
is routed to http://127.0.0.1:8000/xyz
and https://www.example.com/xyz
is routed to https://127.0.0.1:8080/xyz
.
I am not using Apache. I am currently using node.js as my web server and my development environment is in Mac OS X Lion.
See Question&Answers more detail:os