Help with virtual hosts

 
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues
View previous topic :: View next topic  
Author Message
gweinfurther
-


Joined: 17 Jul 2019
Posts: 6

PostPosted: Wed Jul 17, 2019 6:31 pm    Post subject: Help with virtual hosts Reply with quote

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?
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Fri Jul 19, 2019 7:23 pm    Post subject: Re: Help with virtual hosts Reply with quote

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
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group