Warning! Missing hosts entry. This may be inaccessible.
Uh-oh! Could not update hosts file
Local ran into a problem when trying to update the hosts file.
Please ensure that the hosts file is not locked by anti-virus.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
I am trying to create a site using multisite which requires the router mode as site domains. When trying to run the site i get the above error. I am able to run the site just fine in locahhost mode.
I do not have any antivirus installed except for windows defender which i have disabled. I also changed the permission of the host file to not be read only but still get this error.
I really want to ceate a multisite so would like to get this working.
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
Yes creating a new blank site I get the error as well. Its not just with multisite but with the local domain router option. Any site while using this setting does not work. localhost router mode works just fine.
This is not a work machine, its my personal laptop. And no, not running other apps simultaneously.
When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).
Check and see if the issue still persists. If so, please provide us with an updated log. Retrieving Local’s Log File
Something still seems to be blocking Local on your machine here:
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)","process":"nginx","thread":"main","timestamp":"2024-03-08T13:22:15.566Z"}
Here are some steps to help you identify and address this:
Stop all sites that are running in Local
Force quit Local
(If using Mac) Run the command lsof -nP -iTCP -sTCP:LISTEN
(If using Windows) Run the command netstat -ano
What you’ll be looking for here is to see when sites are stopped and Local is properly shut down if there are still programs running on ports 80 and 443. These may be conflicting with Local or the system may be reporting Local is still running.
Once you run that command you should see a list of listening ports. If you see a particular program making use of those ports, you can then kill that process by running sudo kill -9 XXX where XXX is the PID number of that process. (On Windows you will use taskkill /F /pid XXX where XXX is the PID number of that process)
After that, you should be able to retry. Keep us posted if you have any questions or continuing issues.