I am struggling with something so simple...
I have a new laravel app with sail. Visiting laravel.test works.
Trying to modify this domain to something like acme.dev is giving me a headache.
I have modified the /etc/hosts, including 127.0.0.1 acme.dev
I have modified docker-compose.yml file, so the service laravel.test is acme.dev
I have modified .env file so it has APP_URL=
It does not work.
I am struggling with something so simple...
I have a new laravel app with sail. Visiting laravel.test works.
Trying to modify this domain to something like acme.dev is giving me a headache.
I have modified the /etc/hosts, including 127.0.0.1 acme.dev
I have modified docker-compose.yml file, so the service laravel.test is acme.dev
I have modified .env file so it has APP_URL=http://acme.dev
It does not work.
Share Improve this question edited Jan 19 at 12:33 Hector Ordonez asked Jan 19 at 12:11 Hector OrdonezHector Ordonez 1,1041 gold badge12 silver badges21 bronze badges1 Answer
Reset to default 0Found the reason: the TLD dev requires https. https://en.wikipedia.org/wiki/.dev
The only change that was actually required was the /etc/hosts.
The .env file should modified, although is not required for just opening the site:
- APP_URL should point to the domain you want, for routing and links.
- APP_SERVICE should be modified if you also want to modify the service name laravel.test in docker-compose.yml to something else.