Current time: 11-23-2024, 04:19 AM Hello There, Guest! (LoginRegister)


Post Reply 
ServerAlias and specific options for VHosts - manual configuration
Author Message
jmeyerdo Offline
Junior Member
*

Posts: 173
Joined: Oct 2007
Reputation: 2
Post: #1
ServerAlias and specific options for VHosts - manual configuration
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? Smile

Kind regards, Jens
(This post was last modified: 11-01-2007 10:06 PM by jmeyerdo.)
11-01-2007 10:03 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
ServerAlias and specific options for VHosts - manual configuration - jmeyerdo - 11-01-2007 10:03 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)