maybe many of us have already created a few projects but don't really know how to set up your Laravel project to the server. so Today's article will help you deploy your Laravel project to the server.
required
Linux Ubuntu installed LAMP stack for those using Windows, can download VMware, VirtualBox, and install Linux inside the VirtualBox.
Clone the Project
using git clone the project to your var/www
$ cd var/www
$ git clone ...
$ composer install
Update the ENV file
because your env project isn't inside your cloned project, so remember to generate a new env file and new artisan key$ cp .env.example .env
$ php artisan key:
for those who used the database don't forget to adjust your env database, username, password, and migrate the database schema to the database.
Virtual Host File
now it's time to set your 000-default.conf that located inside, /etc/apache2/sites-enabled
DocumentRoot /var/www/<'your_project'>/public
<Directory "/var/www/<'your_project'>/public">
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
don't last set your ports.conf file located on /etc/apache2 and write this
Listen 80
this line is about set your apache to listen the 80 port
now you are good to go….