Better HN
topnewbestaskshowjobs
Log inSign up

mode7

3 karma · joined Jan 7, 2019 (7y ago) · 2 submissions

Submissions

comment 7y ago · link · parent

Routing to an IP in the local network obviously doesn't work outside that local network.

Re-routing the domain to the local machine (by editing /etc/hosts) should work just the same. A certificate from a trusted CA can be validated without an internet connection, they are part of the OS/Browser distribution.

comment 7y ago · link · parent

In my experience, you don't want HTTPS for localhost, you want HTTPS for a server in the local network so that you can also test on other devices than the development machine.

A convenient solution in case you can control DNS at the local network level is to just get an ordinary certificate for a real domain (for example dev.mydomain.com) and have it resolve to that local IP.

Using your own CA is possible too, of course, but getting it installed on all the devices is a nuisance.