Ok, I have a dedicated server that runs cPanel and I need to install wildcard subdomains on a single domain. But, every time a new site is added or apache is reconfigured, cpanel deletes the httpd.conf file and regenerates a new one (so any manual changes to it are discared).
So, cPanel has an include file that you can include before OR after the VirtualHost directives.
httpd.conf
<VirtualHost>
ServerName sitename.com
ServerAlias
www.sitename.com</VirtualHost>
For wildcard domains, I need to remove the ServerName and do it like this:
<VirtualHost>
ServerAlias *.sitename.com
</VirtualHost>
How can I do this without editing the httpd.conf directly?
Start Free Trial