I'm developing a website that should be used with HTTPS. I am developing the site on my Windows machine and I have a Linux machine on the same LAN where I test my websites. I don't have a DNS-server on the LAN so I use IP-addresses to access the website.
On the server I use Ubuntu Server and Nginx web server. Is there any easy way I can test the HTTPS configuration in my LAN? E.g if I generate a SSL-certificate myself, but I don't have a domain name to set up it with. Any recommendations for testing? Or should I use a subdomain test.example.com
and put an A record to my local IP-adress to the test server E.g. 192.168.1.10
?
Generate a self-signed certificate* for Nginx. Configure Nginx to use it.
Edit the
hosts
file on your computer, add the domain your testing.On *nix, it's
/etc/hosts
in Windows it's%systemroot%\System32\Drivers\Etc\hosts
.Add a line similar to
www.example.com 192.0.2.5
(substitute the domain and your server's IP).You should now be able to browse out to
www.example.com
and see the test page on your server.*Ignore the part at the end of these directions, it's for Apache only.