Cannot access WP in "Site Domains" mode

Hi all,

I was using Local with Router Mode: localhost since Site Domains wasn’t working. Today I tried to integrate Local with Bedrock. I’ve created a new site and managed to switch to Site Domains without getting an error (after deactivating Apache), but now I don’t even have access to the normal WP site. I’m either getting a

Server not found

Waterfox can’t find the server at bedrock01.local.

or

This site can’t be reached
bedrock01.local’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN

and this the latest log:

{"thread":"main","class":"ConfigTemplatesService","message":"Compiling service configs...","level":"info","timestamp":"2020-05-27T22:17:37.241Z"}
{"thread":"main","class":"Process","process":"nginx","pid":73696,"level":"info","message":"Killing process","timestamp":"2020-05-27T22:17:37.391Z"}
{"thread":"main","level":"error","stack":"Error: Unable to read hosts file at /etc/hosts\n    at Function.HostsFileService.<computed> [as shouldUpdateHosts] (/opt/Local/resources/app.asar/main/dns/hostsFileService.js:1:3954)\n    at Function.<anonymous> (/opt/Local/resources/app.asar/main/dns/hostsFileService.js:1:3408)\n    at Function.flush (/opt/Local/resources/app.asar/node_modules/debounce-promise/dist/index.js:54:74)\n    at listOnTimeout (internal/timers.js:531:17)\n    at processTimers (internal/timers.js:475:7)","message":"Unable to read hosts file at /etc/hosts","timestamp":"2020-05-27T22:17:38.083Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2020-05-27T22:17:37.441808Z 0 [System] [MY-010116] [Server] /opt/Local/resources/extraResources/lightning-services/mysql-8.0.16+3/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 79794","timestamp":"2020-05-27T22:17:39.510Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2020-05-27T22:17:37.443371Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","timestamp":"2020-05-27T22:17:39.510Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2020-05-27T22:17:39.442519Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","timestamp":"2020-05-27T22:17:39.511Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2020-05-27T22:17:39.509527Z 0 [System] [MY-010931] [Server] /opt/Local/resources/extraResources/lightning-services/mysql-8.0.16+3/bin/linux/bin/mysqld: ready for connections. Version: '8.0.16'  socket: '/home/user/.config/Local/run/VggJ84baV/mysql/mysqld.sock'  port: 10055  MySQL Community Server - GPL.","timestamp":"2020-05-27T22:17:39.512Z"}
{"thread":"main","class":"Process","process":"mailhog","pid":79788,"level":"info","message":"Killing process","timestamp":"2020-05-27T22:20:07.203Z"}
{"thread":"main","class":"Process","process":"mysql","pid":79794,"level":"info","message":"Killing process","timestamp":"2020-05-27T22:20:07.204Z"}
{"thread":"main","class":"Process","process":"nginx","pid":79795,"level":"info","message":"Killing process","timestamp":"2020-05-27T22:20:07.204Z"}
{"thread":"main","class":"Process","process":"phpFpm","pid":79796,"level":"info","message":"Killing process","timestamp":"2020-05-27T22:20:07.204Z"}

Any ideas why it doesn’t work and how can I fix it?
There is an error in the logs:

"Error: Unable to read hosts file at /etc/hosts\

Is this the culprit? How should the /etc/hosts file look like?

OS: Arch Linux
Local: v5.5.2

Anyone?

I’m stuck for hours. I’ve tried already many things, modified /etc/hosts, nginx settings and others without success.
Local works fine in localhost mode.
I don’t see something weird in the logs or anywhere else. I think, it should be working…

EDIT:

I now have access in Site Domains mode. My /etc/hosts file had wrong permissions…
I’ve changed them to 755.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.