0

I am using windows 7 and python 2.7 I created local https server with redirect url to server as its IP address. I created cert file for https using openssl. Then I mapped my local system IP(172.16.17.84) to myapp.nobies.in in hosts file of windows. So my server redirect url becomes https://myapp.nobies.in:443. By doing this IP mapping in host file, I am not getting SSL error. But, I want to distribute my app to others, so, writing in host file through python code is not desirable, as it needs administrative privileges. So, is there any way to assign/map this IP with hostname instead of making an entry in hosts file.

imp
  • 1,575
  • 1
  • 24
  • 38

1 Answers1

0

Have you considered just creating the certificate for the IP address? That wouldn't be much more fragile (probably less fragile, actually) than having to manually add the domain name to hosts files. See https://stackoverflow.com/a/11710762/138772 and https://stackoverflow.com/a/8444863/372643 for more info on that.

An alternative, but one probably requiring more work, would be to include a local DNS server in your app that redirects the domain name to your IP address. I can't really say what the best one to use for that would be, though.

Community
  • 1
  • 1
JAB
  • 19,150
  • 4
  • 64
  • 78