[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Siteadmins



OK, really screwed things up now. I couldn't get siteadmins as I had changed
my hostname and when you typed www.domain.com/siteadmin it redirected to
https://oldhostname:81 etc etc.

I thought I had found a fix on the Cobalt Knowledge base as was as follows.
Now I get no siteadmins whatsoever :-(

HELP!!
-------------


Telnet to the server as admin and su - to root.

Create a file called fixsite.pl and copy the following into it.
chmod the file to 755 and run it.


#!/usr/bin/perl
# creates the admin server pages for all domains on a RaQ 3 or RaQ 4
# except for the home site

require Cobalt::Layout;
require Cobalt::Admserv;
require Cobalt::Vsite;
require Cobalt::Meta;
use Cobalt::Product;

foreach my $vhost (Cobalt::Vsite::vsite_list()) {
    next unless ($$vhost[1]);
	my $fqdn = $$vhost[1];
	my ($group) = Cobalt::Meta::query("type"  => "vsite",
        "keys"  => ["name"],
        "where" => ["name", "<>", "default",
        "and", "fqdn", "=", "$fqdn"]);
#	next if($group eq "home");
	if($group) {
		warn "creating admserver pages for group: $group site name: $fqdn\n";
		Cobalt::Layout::layout_siteManage($group, $fqdn);
		Cobalt::Admserv::admserv_set_access(qq[$AdminPages_dir/siteManage/$group],
'require', 'group', $group);
		unlink("$AdminPages_dir/siteManage/$fqdn") if (-l
"$AdminPages_dir/siteManage/$fqdn");
    	symlink("$AdminPages_dir/siteManage/$group",
        "$AdminPages_dir/siteManage/$fqdn");
	} else {
		warn "unkown fqdn: $fqdn or group: $group\n";
	}
}



The final step will be to change directory to
/usr/admserv/html/.cobalt/siteManage and rebuild a symlink. Type:
ln -s /usr/admserv/html/.cobalt/siteManage/home "IP address of the server"
without the quotes for the IP address.