Steps To Create Sub Domain in Webmin

1. Firstly, log into Webmin control panel.

2. Then go to Servers > Apache Webserver.

3. From that page, select “create new virtual host”.

Also, fill the following field too.

  • Handle connections to address: Select the specific address and IP address of the subdomain in the text field.
  • Document Root: Enter the path of sub-domain,


4. At last, click on the “Create Now” button.

Now, the subdomain successfully created in Webmin.

Note: once the Webmin subdomain is created, a proper DNS record must be added to the corresponding subdomain. Otherwise, errors will appear on the website.

However, you may get errors like “Unable to determine IP address from host name xxxx.domain.com” after creating subdomain due to improper settings in the configuration file.

 

Subdomain errors that may occur

 

Unable to determine IP address from host name test.domain.com

  1. First, use the “dig” command to verify that the subdomain name is resolved to the correct IP address.
  2. Add the “A record” via Webmin. 
    1. go to Servers > BIND DNS Server.
    2. Next, select the zone of the parent domain and click on “Add Record To Selected” button.
    3. Add the following fields
      • In new Record Name field, enter the subdomain name.
      • In new record field, enter the IP address.
    4. Click on the Add Record button.

Wrong settings in the Apache configuration file

If experiencing an issue with subdomain creation. 

  1. analyze the error log in Apache server for misconfiguration in httpd.conf.
  2. check the configuration file and make corrections in /etc/httpd/conf/httpd.conf file.
  3. correct the ServerName and ServerAlias and restart Apache to apply the configuration changes.
    • ServerName www.subdomain.xxxx.com ServerAlias subdomain.xxxx.com