Adding subdomains is very simple and each subdomain can be configured completely independently from the main domain.
As usual, Litespeed makes this a swift and easy operation.
Before we configure Litespeed, ensure you have the folders configured for the subdomain. Please refer to the Litespeed Virtual Host Layout article for a standard layout.
To be honest, setting up a subdomain is exactly the same as setting up any other domain: the difference is that with a subdomain, the domain folder would be called blog.domain.com or admin.domain.com, etc.
Everything else will follow the same layout with sub-folders named public, config and so on.
Once you are happy (and you have added any DNS changes for the subdomain) log into the Litespeed Admin Area and hover over the 'Configurations' link and click 'Virtual Host Templates':
Once there select the template appropriate for your subdomain. In this case, I am going to select the PHP_SuEXEC template as my subdomain will consists of a PHP based script:
Once you have chosen your template, click the 'Add' Link as we want to create a Member Virtual Host:
Simply fill in the appropriate details. In this case I have entered the same name for the Virtual Host Name and the Domain fields. The third field is optional here as it is pretty rare to add the 'www' in front of a subdomain. However, if required, it would be added as follows:
Click 'Save' and you will be taken back to the Virtual Hosts Template screen:
As you can see, the subdomain blog.domain.com has been added. As soon as you 'Apply Changes' and 'Gracefully Restart' Litespeed, the subdomain will be served.
Remember that until you instantiate the subdomain, it will share the same configurations as the template it was created from. Please read Instantiating a Virtual Host for details of instantiation and any impact it has.
Lastly, it is often convenient to share directories between main domains and subdomains and, at the moment, everything is completely separate. The next article will deal with this issue and suggest a few, easy to implement, work arounds.