Setting up Domain alias

How do I set up domain aliases so that, all go to website?

Is this a custom http?

in ehcp,
select it, (automatically selected at first setup)
then on right bottom, "redirect to another domain/url", click here (on xp5 template)
enter the url/domain you wish..
then, the domain will be redirected to whatever you entered.

xp5 template is latest/most up to date template in ehcp.
other templates may not contain all features..left for anyone that may want to use them.
if you update other templates too, to reflect new features, send me a copy, so that i can update them too.
for example, "add subdomain with ftp" link does not exist in most other templates..

It appears you must create a new hosting account in EHCP and then redirect that to another already existing account.

This seems a little wasteful of resources so I decided to manually edit apachehcp.conf

cd /var/www/vhosts/ehcp
nano apachehcp.conf

I searched for the already existing VirtualHost domain and added another domain as an alias.

< VirtualHost * >
(I added this next line)
(Everything else stays the same)
< /VirtualHost >

After saving the apachehcp.conf file I restarted Apache.
/etc/init.d/apache2 restart

I then went to /etc/bind and added a new file for the redirected domain by making a copy of the existing domain file.

cd /etc/bind

In nano I changed all references of the old domain to the redirected domain and saved the file.

I then edited named_ehcp.conf to add the zone for the redirected domain.

nano named_ehcp.conf

I looked for the existing domain zone entry and added another one for my redirected domain.

zone "" {
type master;
file "/etc/bind/";

After I saved the file I restarted Bind.

/etc/init.d/bind9 restart

I checked that the redirected domain DNS setting was pointed to my Name Server and opened a webpage with the redirected domain.

Of course a scripted method of doing this in EHCP would save a lot of time ;-)

Thanks again for EHCP.

do not forget that apachehcp.conf is generated automatically each time that you add/update anydomain,
so, your changes will be lost,
you should better edit apache/http template for that domain, in ehcp gui.. that way, http template is loaded from db, so that your changes will be kept.

I will think about your way of implementing domain redirection in ehcp, you are absolutely right, your way is less resource consuming, that is better,

I understand now that a new apachehcp.conf is generated when adding a new site or using the 'Sync Domains' menu option in EHCP. I also see that a new named_ehcp.conf is generated when 'Sync DNS' menu option is used.
These are created from the MySQL domains table.

So I took your advice and added .net and .org domains to be redirected into MySQL database 'ehcp' table 'domains' with the source directory of the original .com domain.
Now when I select 'Sync Domains' the domains I added appear at the bottom of apachehcp.conf
Likewise when I select 'Sync DNS' the zone entry for the two domains appear in named_ehcp.conf

The domains seem to be working. The .net and .org domains now go to the .com domain and I can add new sites without problem.