Advertisement

06.17.2008 at 10:06AM PDT, ID: 23492377 | Points: 100
[x]
Attachment Details

Apache2 VirtualHost Config Question

Asked by guitarclap in Apache Web Server, Miscellaneous Web Development

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
[+][-]06.17.2008 at 11:11PM PDT, ID: 21810505

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 11:46AM PDT, ID: 22441565

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628