How to deploy Laravel application on AWS EC2

In the first step you should login to your putty using user name and password.

After Login you should run command sudo -s for root access

then you should change your directory to Xampp htdocs location so for that you should type command
cd /opt/lampp/htdocs

Now you should clone your project directory from bitbucket using clone command
git clone

after cloning repo you should jump into that folder using cd repoName and run some below commands for installtion of node_modules and vendor file and also setup of .env file.

first of all you should copy .env file using cp .env.example .env

run below some commands for some setup
npm install for node_modules
composer install for vendor files
npm run dev ( combines all your Vue components and other JavaScript files into a browser-friendly combined file )

if all the above command runs successfully then a create a virtual host in Xampp. for this you should change the dir to cd /opt/lampp/etc and open httpd.conf file to uncomment below line and save file

#Virtual hosts
#Include conf/extra/httpd-vhosts.conf

Now again change directory and went into cd /opt/lampp/etc/extra and below line to httpd-vhosts.conf file

After following above steps you can easily run any laravel project in AWS EC2 Machine. and you should also know that xampp is already installed in your machine if you want to learn the xampp installtion then follow below urls.

Resource 1 : Link
Resource 2 : Link