gweinfurther wrote
I am trying to set up a virtual host on my local machine. The domain name is craft.dev. I have added this to my Windows hosts file, pointing to 127.0.0.1. I have added the domain name to a new host in the Abyss config.
When I ping craft.dev, it correctly shows 127.0.0.1. But when I try to browse to craft.dev in a browser, I get "craft.dev refused to connect."
What am I doing wrong?
When you browse
http://craft.dev, your browser rewrites the URL to be
https://craft.dev and since you have no HTTPS site, it won't work.
So the issue seems to be that your browser is forcing you to see the HTTPS version of the Web site which isn't simply available.
So why this HTTPS forcing? It turns out this is related to the .dev domain name extension. This new extension is managed by Google and is part of the new trend of HTTPS-only domain names. This is similar to the .app extension (also managed by Google.)
Modern browsers have a list of HTTPS-only domain name extensions and will always use HTTPS with any domain name ending with them. This is called the preloaded HSTS list.
So the solution is to use another domain name, for example craft.test, or try generating a self-signed certificate for craft.dev and serve it on both HTTP and HTTPS in Abyss Web Server:
https://aprelium.com/abyssws/articles/self-signed-cert.html