Koozali.org: home of the SME Server

e-smith-manager

Reinhardt

e-smith-manager
« on: October 12, 2001, 03:15:37 AM »
I wanted to know whether there is a way of changing the URL where the E-Smith Manager can be found.  If for example it is possible to make it /admin instead of e-smith-manager.  Is so how can I do this?

Bud

Re: e-smith-manager
« Reply #1 on: October 12, 2001, 09:06:30 PM »
Sure,

Simply modify the 75Redirect00 file in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/75Redirect00

Just add a new "Redirect" line to the file. and do a /sbin/e-smith/signal-event console-save

# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Format: Redirect fakename url

# Note, the use of LocalIP here will present a problem when SSL allows
# us to provide external access to the manager.

Redirect /admin http://{$LocalIP}:980
Redirect /e-smith-manager http://{$LocalIP}:980

{
    my $result = "";
    my $panelDir = "/etc/e-smith/web/panels";

    opendir (DIR, $panelDir)
        || die "Can't open web/panels directory.\n";
   
    # drop the "." and ".." directories
    my @panels = sort (grep (!/^\.\.?$/, readdir (DIR)));
   
    closedir (DIR);
   
    my $panel;

    foreach $panel (@panels)
    {
   next if ($panel eq 'manager');
        $result .= "Redirect /$panel http://$LocalIP:980/e-smith-$panel\n";
    }

    $result;
}