Is there a way to get cpanel to use the right server_name for addon domains?
Problem: cpanel addon domains produce virtualserver containers in the httpd.conf file that use both the main account domain name and the new addon domain name as part of the httpd.conf servername directives... this produces urls like http://newdomain.com.accountdomain.com which confuse the websurfer and the search engines... for example...
<VirtualHost 127.0.0.1>
BytesLog domlogs/addon.com.accountdomain.com-bytes_log
ServerName addon.com.accountdomain.com
ServerAlias www.addon.com.accountdomain.com
ServerAlias addon.com *.addon.com
ServerAdmin [email protected]
DocumentRoot /home/accountname/public_html/addon.com
CustomLog domlogs/addon.com.accountdomain.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/addon.com/cgi-bin/
User username
Group username
</VirtualHost>
Unless there is a great reason to do otherwise, at least from my viewpoint as a programmer, cpanel should be writing something like:
<VirtualHost 127.0.0.1>
BytesLog domlogs/addon.com-bytes_log
ServerName addon.com
ServerAlias www.addon.com
ServerAlias addon.com *.addon.com
ServerAdmin [email protected]
DocumentRoot /home/username/public_html/addon.com
CustomLog domlogs/addon.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/addon.com/cgi-bin/
User username
Group username
</VirtualHost>
The main issue is that cpanel should be writing
ServerName addon.com
ServerAlias www.addon.com
ServerAlias addon.com *.addon.com
If there is a way to force this by configuration please advise. Also consider this a "bug fix" request ;-) ... some scripts need to know what server they are running on and these double-size url's are a pain from a programmers perspective.
Thanks!
DC