Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

APP_URL not refreshing after a change

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:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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?

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading