3

I am running into problems with virtual hosts while trying to run Craft locally. My setup was working perfectly and after a restart of my mac I get error messages and I don't understand why.

I am using Mamp to run Apache and MySQL. When I am going to one of my virtual host url I get the following error:

enter image description here

And when I type 'localhost' I get the following:

enter image description here

I have double checked the httpd.conf and the virtual hosts is enabled and my httpd-vhosts.conf is set up correctly as well.

I assume there is a certain issue with the virtual hosts as but I just cannot figure it out and it stop working without any changes/updates form my side so I'm really loosing it...

Does any one has an idea where to start searching for the problem?

5

You can't use the domain .dev anymore, it's Google's gTLD (https://icannwiki.org/.dev) and they don't want to share. See https://medium.engineering/use-a-dev-domain-not-anymore-95219778e6fd for a detailed backstory.

Instead, you should use the TLDs reserved by the IETF for this purpose, like .test.

For reference, this is the HSTS List maintained by Chromium which is in turn the basis for the lists used by Firefox, Opera, Safari, Internet Explorer and Edge

  • I didn't set up my environment for SSL but for some reason when I type in the browser ttp.craft.dev it gets the https added automatically. Would that might be some hint? – Less and More Collective Dec 13 '17 at 15:08
  • Please try the solution on this question stackoverflow.com/a/28586593 – hashtagerrors Dec 13 '17 at 15:26
  • 2
    @hashtagerrors Not really? Chrome 63 (out since December 2017), forces all domains ending on .dev (and .foo) to be redirected to HTTPS via a preloaded HTTP Strict Transport Security (HSTS) header. This behaviour will be extended to other browsers over the coming weeks. Good luck with continuing to use .dev. – Seth Warburton Dec 13 '17 at 15:33
  • @hashtagerrors You are also ignoring the fact that this is a legit gTLD that you should not be using for local dev. There are specific domains defined for local dev, this is not one of them. It may have worked in the past, that does not mean it was ever the right thing to do; it wasn't. – Seth Warburton Dec 13 '17 at 15:37
  • @SethWarburton Yes you are right. I support you on this, that's why I thanked you for the information. – hashtagerrors Dec 13 '17 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.