How to create a new Subdomain | Abdul Haq

How to create a new Subdomain

First make sure your DNS is working. You can use a A, AAAA or CNAME record as long as it points to your IP address.

Now go to /etc/apache2/sites-enabled and create a .conf file.

Add following lines to the file:

<VirtualHost *:80>
    ServerName subdomain.mydomain.com
    DocumentRoot /var/www/subdomain.mydomain.com
</VirtualHost>

Then restart your server:
sudo service apache2 restart


Tags:


Please share if you found this useful


Recent Posts

Developing a WordPress theme

If you are here, I assume you have heard about WordPress before.  If not, let me tell you th...

Creating feed like Instagram Android

Few weeks back I showed how you can create profile similar to Instagram. You can see that article...

Reducing EBS volume size AWS

I recently shifted all my images and videos data from EBS volume to S3 as it was cheaper. After c...

Android Instagram like profile

Today I will show how you can create profile similar to Instagram's profile in android. It is mor...

top