-
Set EC2 Instance, Download Key-Value Pair (.pem)
-
Get Putty Compatible Key ppk, using PUTTygen by loading .pem key without adding parameters
-
Enter
user@public-dns
as server and Add SSH Key to Auth in Settings -
Update Apt-Get Packages
sudo apt-get update
-
Install Python-Software-Properties
sudo apt-get install python-software-properties
-
Install Locale's needed for PPA:ONDREJ
sudo apt-get install -y language-pack-en-base sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
-
Update Dependencies
sudo apt-get update
-
Add PPA:ONDREJ
sudo add-apt-repository ppa:ondrej/php
-
Install php 7.0
sudo apt-get install php7.0
-
Install Apache2
sudo apt-get install apache2
(optional : Finding other modules) sudo apt-cache search php7-*
-
Install SQL Server ( root, secret )
sudo apt-get install mysql-server
-
Install PHP 7 with mySQL
sudo apt-get install php7.0-mysql
-
Install PHP-7 dependencies for Apache2
sudo apt-get install libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-json
-
Install Git
sudo apt-get install git-all
-
Install PhpMyAdmin [ secret, secret ]
sudo apt-get install phpmyadmin
( Make sure to tick the damn server using space, an asterisk will indicate if it's selected )
-
Clone Repo to www directory
git clone repo to www/ directory
-
Edit the Configuration
sudo nano /etc/apache2/sites-available/000-default.conf
-
Change Document Root, to cloned repo's public
sudo service apache2 restart
- Change
sudo nano /etc/apache2/000-default.conf
to Laravel's Public Directory / Create a new conf file - Browser's HTTP 500 Error will be displayed if the above is completed successfully.
- Navigate to root of laravel project, use
ls -a
to display all hidden files ( .env ) - Copy Example Environment & Set it as default
sudo mv .env.example .env
- Set environment using
sudo nano .env
- Create db using phpMyAdmin and Populate with ExistingData / Skip if Seeding
- Install Composer
sudo apt-get install composer
- Install unzip Package required for Composer
sudo apt-get install unzip
- Go to repo & Install
sudo composer install
- Add Proper Permissions
sudo chmod 775 main-repo-folder
sudo chmod -R 777 storage
- Give permissions to Composer if required
sudo chown -R $USER $HOME/.composer
- Set a key for Laravel App
sudo php artisan key:generate
- Enable Mod Rewrite for URL Redirection
sudo a2enmod rewrite
- Set Document Root in /etc/apache2/sites-enabled/000-default.conf , change DocumentRoot: /var/www/{laravl folder name}/public
sudo nano 000-default.conf
ADD within <VirtualHOst *:80>
<Directory "/var/www/laravel/public">
AllowOverride all
</Directory>
-
Restart Server and Visit the Public DNS
sudo service apache2 restart
-
ADD DNS
sudo nano /etc/resolv.conf
tonameserver 8.8.8.8
Find out the version of Ubuntu
lsb_release -a
In case of missing extension errors
Try Installing