Follow these steps:
-
first
/etc/hosts -> add new -> 127.0.0.1 yourdomain.local
-
/etc/apache2/site-available/ 000-default conf copy to yourdomain.local.conf <VirtualHost *:80> ServerName yourdomain.local DocumentRoot /path/to/your/laravel/project/public <Directory /path/to/your/laravel/project/public> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
-
sudo a2ensite yourdomain.local.conf
-
sudo a2enmod rewrite
-
sudo systemctl restart apache2
-
APP_URL=http://yourdomain.local
-
php artisan config:clear