Apache won't reload if Win10 drivers/etc/hosts is blocked by another process
I have this situation where editing the hosts file is prevented by another process. This is required for some unrelated stuff I can't and wouldn't change.
This shouldn't cause any problems with Auto virtual hosts turned off in Laragon. But it still does. Any time I try reloading Apache, it throws an alert with <Can not open file "C:\Windows\system32\drivers\etc\hosts". The process can not access the file because it is being used by another process.> and then crashes completely.
So right now I can't use Laragon, as there is no way for me to change anything in the Apache configuration files. Is there a workaround for this, maybe another setting I need to turn off or something to force Laragon not to try to edit the hosts file?
@ka-steve : Just disable "Auto virtual host" in Menu > Preferences
@leokhoa: thanks for the reply but as I mentioned above, it still crashes with "Auto virtual host" disabled. (Actually I can't even enable it as Laragon sees it's Read only.)
Is anything else Laragon would edit the hosts file for? If not, this may be a bug...
@ka-steve try to look what service locked the host file.
@mo0oshi: I know which process blocks it and it is intended for an unrelated reason.
My problem is that with "Auto virtual host" disabled, Laragon should not even try to edit the hosts file, so it shouldn't be a problem that it's blocked. And even if for som unknown reason there is a conflict, it shouldn't cause Laragon to crash, making the whole system unusable.
@ka-steve : When you uncheck "Auto virtual host", Laragon will never touch the hosts file. Do you have any error message?