Forked from masiur/setup laravel project on server
Last active
June 16, 2016 16:56
-
-
Save talha08/2822fce71331d2ba3ca337f968569f19 to your computer and use it in GitHub Desktop.
Laravel Project setup on UBUNTU server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Execute the Steps serially | |
laravel 5.1 | |
assuming domain name 'sustcse12.cf' | |
sudo apt-get update | |
sudo mkdir -p /var/www/sustcse12.cf/public_html | |
sudo chown -R $USER:$USER /var/www/sustcse12.cf/public_html | |
cd /var/www/sustcse12.cf/public_html | |
git clone https://github.com/talha08/sust_cse_12.git | |
cd sust_cse_12 | |
composer update | |
Go to phpmyadmin and create a table name: sust_cse_12 | |
nano app/config/database.php {edit database file } for 5.1 nano .env | |
set database as sust_cse_12 and also the password | |
php artisan migrate | |
php artisan db:seed | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/sustcse12.cf.conf | |
if second domain copy from first domain | |
sudo cp /etc/apache2/sites-available/sustcse12.xyz.conf /etc/apache2/sites-available/sustcse12.cf.conf | |
sudo nano /etc/apache2/sites-available/sustcse12.cf.conf | |
In total, our virtualhost file should look like this: | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName sustcse12.cf | |
ServerAlias www.sustcse12.cf | |
DocumentRoot /var/www/sustcse12.cf/public_html/sust_cse_12/public | |
<Directory "/var/www/sustcse12.cf/public_html/sust_cse_12/public/"> | |
ErrorLog /var/www/coolexample.com/error.log/error.log | |
CustomLog /var/www/coolexample.com/error.log/access.log combined | |
AllowOverride All | |
</VirtualHost> | |
Save and close the file. | |
sudo a2ensite sustcse12.cf.conf | |
sudo service apache2 restart | |
cd /var/www/sustcse12.cf/public_html/sust_cse_12/ | |
sudo chmod -R 777 storage | |
sudo chmod -R 777 public {-- this is permission read write and execute --} | |
Finally Check if the site is okay ! ~~ sustcse12.cf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment