Error:ERR_NAME_NOT_RESOLVED
-
HI, i'm working on a Laravel project with laragon, before i could access by typing "myapp.test" in URL bar. I made some modifications on hosts file which is inside the system32 folder, so i can't access "myapp.test" anymore. I deleted the changes that i had added, but i still do not have access. Even the line 127.0.0.1 "myapp.test" is still on hosts file.
-
@Alberto said in Error:ERR_NAME_NOT_RESOLVED:
HI, i'm working on a Laravel project with laragon, before i could access by typing "myapp.test" in URL bar. I made some modifications on hosts file which is inside the system32 folder, so i can't access "myapp.test" anymore. I deleted the changes that i had added, but i still do not have access. Even the line 127.0.0.1 "myapp.test" is still on hosts file. Thank you very much!!!
-
@Alberto : Can you check if your hosts file is not corrupted by typing?:
ping myapp.test
-
@leokhoa said in Error:ERR_NAME_NOT_RESOLVED:
@Alberto : Can you check if your hosts file is not corrupted by typing?:
ping myapp.test
I just tried it, the ping request didn't find myapp.test host.
-
@Alberto : So you hosts file is corrupted. Please try:
- Backup your hosts file
- Clean all the content
- Click "Start All/Stop" so Laragon will generate new hosts entries
- Test ping again
-
@leokhoa said in Error:ERR_NAME_NOT_RESOLVED:
@Alberto : So you hosts file is corrupted. Please try:
- Backup your hosts file
- Clean all the content
- Click "Start All/Stop" so Laragon will generate new hosts entries
- Test ping again
I followed the indications, Laragon generated hosts entries but it didn´t work.
-
I experienced the same issue and realized that I also needed to delete the auto config file for the domain I was having issues with in the apache2 folder.
This is what I did to resolve the issue:
-
Go to C:\laragon\etc\apache2\sites-enabled
-
Delete the auto.your-domain-name.test.conf file.
-
Restart Laragon or click the Stop / Start button twice.
-
Go back to C:\laragon\www and create a new folder with the same domain name.
-
CD into the folder, create an index.php file, and write a simple echo statement like so:
<?php echo 'Hello world!';
-
Restart Laragon again and try visiting your test domain once more.
-