08-24-2016, 09:42 AM
Well here is a small tutorial
Add these lines on your apache configuration file.
Now create your directory for the subdomain
Last Step restart your apache server
You can repeat the same steps for each subdomain you want.
Add these lines on your apache configuration file.
Code: (Select All)
<VirtualHost *:80>
ServerName subdomain.example.com
DocumentRoot /var/www/subdomain.example.com
</VirtualHost>
Now create your directory for the subdomain
Code: (Select All)
mkdir -p /var/www/subdomain.example.com
Last Step restart your apache server
Code: (Select All)
sudo service apache2 restart
You can repeat the same steps for each subdomain you want.