Not able to enable Auto create virtual hosts
Laragon gives me error while enabling "auto create virtual hosts".
This feature i like most about laragon.
I changed hosts file permissions but it is not working.
It was working fine with laragon 9.
I am using windows 10 64 bit
I am getting this error
Oops! Your system prevents changing hosts file.
Please check permissions in security tab or check if the fie is read only.
Laragon will temporarily disable "Auto crate virtual hosts" feature!
Si i can not able to enable Auto crate virtual hosts feature.
Please tell me how to solve this problem.
From version 1.0, Laragon uses nodejs get permissions to modify hosts file, so things may work differerently.
You hosts file is readonly, so Laragon can not modify.
You must manually change your hosts file permission.
Right click your hosts file, then:
- Check if your hosts file is not Read-only.
- Click Security tab, check if your user has Read & Write permissions checked
I changed permission for users to- Full Control
But still i cant enable this feature
Could you please show me an image or something?
attached screen shot of hosts permission!
How about Administrators group or Read-only checked or not?
Read only is unchecked .
Administrator group has all permissions (it is disabled, i can't edit it).
Something like this:
yes same it looks same
@john5db : I've released Laragon 1.0.4. Hope it fixes your issue.
Sometime, the antivirus software is blocking the hosts file access.
Avira is locking the access, I must change the settings every time I create a new project.
Still not working
Laragon will show instruction message in more details when hosts file is Read-only.
From the details message you can find out what's wrong.
My current permission screenshot.
Humm. From the information, Laragon should be able to modify your hosts file. @Daniel said sometimes the antivirus is blocking the hosts file access.
If it is not your case, you can force "Auto create virtual hosts" feature by openC:\laragon\bin\laragon\laragon.ini
Change AutoVirtualHosts to -1
Hello, i have one tip.
I create a group (net localgroup GROUPNAME /add), then i add new user to the group (net localgroup GROUPNAME USERNAME /add). Last i add permissions to the files or folders (icacls FILE_OR_PATH /grant GROUPNAME:f /q).
net user /add DeveloperName *
net localgroup DevelopersGroup /add
net localgroup DevelopersGroup DeveloperName /add
icacls "C:\Windows\System32\drivers\etc\hosts" /grant DevelopersGroup:f /q
icacls "C:\laragon" /grant DevelopersGroup:f /q
@Daniel thank you,
this response saved my life
@lucasprogamer Yes the same case for me with Kaspersky antivirus, after moving laragon services to the trusted zone applications, the problem solved
Thanks You saved my life. Finding solution from 6 months.
Kaspersky antivirus was restricting it. Its working now.