Laravel project setup in AWS
Below are the steps to set up Laravel project in AWS instance.
- Login to the AWS instance.
- sudo yum update
- sudo yum install httpd24 php56 php56-pdo php56-mbstring php56-mcrypt php56-mysqlnd
- sudo curl -sS https://getcomposer.org/installer | php
- sudo mv composer.phar /usr/local/bin/composer
- sudo yum install git
- cd /var/www/html
- sudo git clone https://username@example.com/path/to/repository.git
- Rename the cloned repository/project directory if required.
- cd project-name
- sudo vi .env
- Change the MySQL connection details.
- php artisan config:cache
- cd /etc/httpd/conf
- sudo vi httpd.conf
- Insert below commands
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /var/www/html/project-name/public
<Directory /var/www/html/project-name/>
AllowOverride All
</Directory>
</VirtualHost>
- sudo service httpd start