最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to use a different local domain than test with laravel sail - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Found 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.
发布评论

评论列表(0)

  1. 暂无评论