HostOnNet Blog

How do I set up a dev site on Ubuntu 16.04 LTS

Looking for Linux Server Admin or WordPress Expert? We can help.

This tutorial will teach beginners to setup local dev site on Ubuntu.

First step in this process is to edit Apache’s primary configuration file at /etc/apache2/apache2.conf

I used the below command to open apache2.conf

cd /etc/apache2/
subl /etc/apache2/apache2.conf

or you can use

sudo nano apache2.conf

Then I added the below line at the bottom of the file.

IncludeOptional /home/sibi/conf/vhosts.conf

Created conf and www folder in home

and then created vhosts.conf file with following content in /home/sibi/conf/

        ServerName demo.test
        DocumentRoot /home/sibi/www/demo
        <Directory "/home/sibi/www/demo">
            Options All
            AllowOverride All
            Require all granted
            Order allow,deny
            allow from all

Opened the hosts file

subl /etc/hosts

and added the below line demo.test

Created demo folder inside ‘www’ (/home/sibi/www/), then created index.html file for demo folder.

Restarted apache

    sudo service apache2 restart

About Sibi Antony

Bootstrap and Android LOVER. I've been creating things for the web for over 10 years, from the period of flash and table based layout web sites till mobile and tab friendly web sites.
Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.