Creating Subdomains with the Apache Server

To do this, we need to go back to our copy of httpd.conf.

First: Find the line:

# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#<VirtualHost *>
# ServerAdmin
# DocumentRoot /www/docs/
# ServerName
# ErrorLog logs/
# CustomLog logs/ common

Add this below Ok, you will have to change these directorys to what you want. You MUST have a .tk do do this. (or some extension). For the DocumentRoot, the directory would turn out to be c:\apache2\sub\ but you don't add the C:\ and also, be sure you add the correct /'s. For the Errorlog and the transferlog, besure to create thoes files before running your server.

DocumentRoot /apache2/sub/
ErrorLog /apache2/sub/logs/error.log
TransferLog /apache2/sub/logs/transfer.log

That is how you can create subdomains with apache. Any questions, Please PM me.