0

I have created virtual hosts by going to C:\xampp\apache\conf\extra\httpd-vhosts.conf then i wrote this:

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName   localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/basicwebsite/public"
ServerName   basicwebsite.dev
</VirtualHost>

and then i went to hosts file in C:\Windows\System32\drivers\etc and wrote this:

127.0.0.1   localhost
127.0.0.1   basicwebsite.dev

then I stopped the apache server and again start it, normally it should have open the laravel application that we are making but when i open browser and typed basicwebsite.dev it showed an error in my browser it shows this Screenshot of my page when i type the link

it says this site cant provide secure connection. but it shouldn't have shown this , it should have shown the page. What to do here?

2 Answers2

0

Laragon provides this feature very well. It is easy to setup virtual host with it beacuse it provides Pretty URLs using

Auto Virutal Hosts Learn more about laragon here

Murad
  • 1,064
  • 16
  • 13
0

.dev is blocking by browser. Instead of that use .loc or something else

GrigorAtaryan
  • 445
  • 4
  • 10