Hi!
Even if I started implementation of adding/generating ServerAliases by isp-CP-webinterface I found a much more easier workaround now.
My primary goal is to use real ServerAliases and add special httpd-options to specific VHosts.
With the following small changes you can add specific .conf-files for each VHost manually on the console (ServerAlias, further options like WebDAV...). For each VHost a new subdirectory is created and all .conf-files are parsed by include-command in the ispcp.conf.
Add to "ispcp-dmn-mngr" in part "dmn_add_httpd_file_data" the following lines:
Code:
#
# Domain config-include dir;
#
my $www_config = $main::cfg{'APACHE_SITES_DIR'};
if (! -d "$www_config/$dmn_name") {
$rs = make_dir(
"$www_config/$dmn_name",
"root",
"root",
0755
);
return $rs if ($rs != 0);
}
Add to "dmn_entry.tpl" the following line before </VirtualHost>:
Code:
Include conf.d/sites-available/{DMN_NAME}
If you want you can add a deletion-routine for the directory of course and you have to consider if you need this for subdomains/aliases also.
Usage:
Add .conf-files in the specific directory, i.e. an alias.conf:
Code:
ServerAlias furtherdomain.com www.furtherdomain.com
I see the following advantages/problems:
+ administrator can add ServerAlias manually - and they are not overwritten with a domain-update
+ no major changes necessary
- no automatic checks by isp-CP if a new domain is added manually as ServerAlias this way already
Is there some feedback about this "hack"?
Of course I am still considering to go ahead with my own hack to add a ServerAlias-option for isp-CP-webinterface but this will need major changes. Perhaps this is planned for a later version?
Kind regards, Jens