Kamis, 05 Juni 2014

Setting Up Virtual Hosts on Local Ubuntu

Create a virtual host on Ubuntu server is done in the following way;

1. Go to folder /etc/apache2/conf.d/ and create a new file. Example; mylaravel.conf

    DocumentRoot "/home/kenzominang/mylaravel/public" ServerName virtual_ok
    <Directory "/home/kenzominang/mylaravel/public">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all

2. Open /etc/hosts and add this line below mylaravel

3. Restart apache to make it work

$ sudo /etc/init.d/apache2 restart