Article 2

What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

A right way to setup multiple domains on localhost

Step 1: Decide your project name. E.g. workhaven

Step 2: Create a separate database for the project.

CREATE USER workhaven_user@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON workhaven.* TO workhaven_user@localhost;

Step 3: Create one separate directory for your project in webroot. In my case it would be `/var/www/html/workhaven`.

Step 4: Now, you need to setup vhosts for your project in `/etc/apache2/sites-available`. For every vhost you have to make a conf file in this directory. The name of the file must end with `.conf`. In my case it would be `workhaven.conf`. Add following content in this file.

<VirtualHost *:80>

  ServerName workhaven.local

  DocumentRoot "/var/www/html/workhaven"

  <Directory /var/www/html/workhaven/>

    Options Indexes FollowSymLinks

    AllowOverride All

    Require all granted



FollowSymLinks means if a dir is a symbol link, follow the link.

AllowOverride controls what directives may be placed in .htaccess files.

Step 5: Once you create the conf file, enable the site and restart the server.

sudo a2ensite workhaven
sudo service apache2 restart

Step 6: Make a host entry in your /etc/hosts file. workhaven.local

Step 7: And here we go. Visit http://workhaven.local in your browser. You can install whatever you want in this directory like WordPress, Magento, Joomla etc.

Feel free to post your doubts below.