0

I'm building a Laravel 9 app using Docker.

I'm just starting, so I merely updated the APP_URL variable in the .env (from "http://localhost" to "http://mydomain.local").

After this, I ran the following commands:

php artisan cache:clear
php artisan config:clear
php artisan route:clear
composer dump-autoload

and I restarted the Docker container of the app.

Yet, when I access http://mydomain.local in my browser, the app doesn't load. It still loads properly when I user http://localhost as originally configured.

What am I missing?

lesssugar
  • 15,486
  • 18
  • 65
  • 115
  • Is your web server configured to respond to that domain (apache/nginx) ? And do your dns correctly resolve this domain ? – Lk77 Nov 09 '22 at 14:18
  • My web server? You mean Docker? Do I need to configure this in Docker separately? – lesssugar Nov 09 '22 at 14:27

1 Answers1

1

This is because you probably didnt edit the vhost..

Just changing the APP_URL in the .env file doesnt change how the browser resolves a domain name.

See this thread to learn how to edit a vhost file: WAMP Server virtual hosts configuration

dvicemuse
  • 370
  • 2
  • 10