Install Laravel in Ubuntu 16.04


Installing Laravel

In previous post i have explain you how to install composer, today we will learn how to install Laravel using composer.
becouse i’m using apache webserver then my default Documentroot is in the /var/www/html.
so, open you terminal and go to /var/www/html and then run this command

Make VirtualHost

Now go to the /etc/apache2/sites-available directory and use
the following command to create a configuration file for our laravel install.
cd /etc/apache2/sites-available
sudo nano laravel.conf
<VirtualHost *:80>
    ServerName webtoken.faiz

    ServerAdmin faiz@localhost
    DocumentRoot /var/www/html/blog/public

    <Directory /var/www/html/blog>
        AllowOverride All

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Now we have to enable this newly created .conf file and disable the default .conf file that is installed with the default Apache install. Also we need to enable mod_rewrite so that permalinks can function properly.

sudo a2dissite 000-default.conf
sudo a2ensite laravel.conf
sudo a2enmod rewrite
sudo service apache2 restart

now open  browser and hit http://webtoken.faiz . picture below is screesshoot of my project