How to set up server/domain name correctly in hosts file with HTTPS
Posted
by
Byakugan
on Server Fault
See other posts from Server Fault
or by Byakugan
Published on 2012-06-04T00:41:58Z
Indexed on
2012/06/04
4:42 UTC
Read the original article
Hit count: 483
I am trying to do local network and I am using these kind of types of network. 1) Main server which connects to internet with static IP 2) Second computer connected to first one locally with address like 192.168.0.2 - when I write this address to address line it is like i wrote localhost in original main server - so it should show my local web browser etc ...
It has domain name this IP and connected router for it ... example www.domain.com so I added to my main server hosts file (linux powered) lines like these:
192.168.0.2 domain.com www.domain.com
It was working ok when I entered my domain name in local computer it showed my site ... But after some time I added HTTPS cerfiticate and added this line to my apatche server:
Redirect permanent / https://www.domain.com/
And now it does not work even when i add something like this to my hosts file:
192.168.0.2 https://www.domain.com
So any idea how do do this thing work? Thank you.
© Server Fault or respective owner