Jump to content


Photo

direct URL for login


  • Please log in to reply
9 replies to this topic

#1 Roadrunner

Roadrunner

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 March 2006 - 07:22 PM

Hi,

just wondering if there is a direct link to login to the sitebuilder like www.domain.com/sitebuilder

Most of my clients never used cpanel and it would be way easier for them to access it directly.

Matt

#2 kalidust

kalidust

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 March 2006 - 07:27 PM

I agree that this would be a nice feature.

#3 Anacrusis

Anacrusis

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 March 2006 - 09:39 PM

Here's how I did it

in /usr/local/apache/conf/httpd.conf
Find this:
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi

Add this below it:
ScriptAlias /sitebuilder /usr/local/cpanel/cgi-sys/sbredirect.cgi

create a new file called sbredirect.cgi in /usr/local/cpanel/cgi-sys with the following code in it:

CODE
#!/usr/bin/perl -T
use Sys::Hostname qw(hostname);

my $rdhost = $ENV{'HTTP_HOST'};

open(CPCONF,"/var/cpanel/cpanel.config");
while(<CPCONF>) {
           next if (/^#/);
           s/\n//g;
           ($var,$value) = split(/=/, $_);
           $CPCONF{$var} = $value;


}
close(CPCONF);

if (($ENV{'HTTPS'} eq "on" || $CPCONF{'alwaysredirecttossl'}) && $CPCONF{cpredirecthostname}) {
        $rdhost = hostname();
}
if ($port eq "") { $port = '2082'; }
if ($sslport eq "") { $sslport = '2083'; }


$sbpath = "/3rdparty/rvsitebuilder/index.php?/sitebuilder/sitebuilderhome";

if ($ENV{'HTTPS'} eq "on" || $CPCONF{'alwaysredirecttossl'}) {
    if (${rdhost} ne "") {
        print "Location: https://${rdhost}:${sslport}$sbpath\n\n";
    } else {
        print "Location: https://$ENV{'REMOTE_ADDR'}:${sslport}$sbpath\n\n";
        }
} else {
    if (${rdhost} ne "") {
        print "Location: http://${rdhost}:${port}$sbpath\n\n";
    } else {
        print "Location: http://$ENV{'REMOTE_ADDR'}:${port}$sbpath\n\n";
    }
}


chmod 755 sbredirect.cgi
chown root.wheel sbredirect.cgi

Run cPanel EA3 distiller.

/usr/local/cpanel/bin/apache_conf_distiller --update

Run /usr/local/cpanel/bin/build_apache_conf and check httpd.conf again make sure the added ScriptAlias /sitebuilder line still exist on the file. If it is ok, restart apache. Now you can go to customerdomain.com/sitebuilder and they will be redirected to rvsitebuilder and cpanel will authenticate them on the way.



#4 pairote

pairote

    Administrator

  • Admin
  • PipPipPip
  • 4,351 posts

Posted 08 March 2006 - 03:16 PM

Great tip!

#5 Roadrunner

Roadrunner

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 09 March 2006 - 04:37 PM

Just wondering if that works on a shared server as well as we don't have access to httpd.conf and I don't think we can chown root. something otherwise GREAT.

Matt

#6 SoftDux

SoftDux

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 14 March 2007 - 10:19 PM

QUOTE(Roadrunner @ Mar 9 2006, 11:37 AM) <{POST_SNAPBACK}>
Just wondering if that works on a shared server as well as we don't have access to httpd.conf and I don't think we can chown root. something otherwise GREAT.

Matt


maybe this should be part of the base code for RVSitebuilder, especially since a lot of people won't / don't have root access, and their hosts may not want to make these changes
Linux & Windows Shared, Reseller, VPS & Dedicated hosting in South Africa & USA. Visit http://www.SoftDux.com

#7 bubblewrapper

bubblewrapper

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 23 November 2007 - 01:06 PM

This little trick worked great on my tryout domain.
Can anyone tell me how to setup the same thing but for master accounts on my sub-domains?

ie. I have a primary site called www.mydoamin.com
All of my clients have there accounts registered to a sub-domain of the above. ie. client1.mydomain.com, client2.mydomain.com, client3.mydomain.com etc.

For them to login to rvsitebuilder, they must navigate to client1/2or3.mydomain.com/cpanel, then log into cpanel, then click on rvsitebuilder icon.

I would like all clients to visit a central login (from a link on www.mydomain.com) which logs them in and takes them direct to their rvsitebuilder in one step.

Can this be done? Can anyone help please?

Thanks in advance
BubbleWrappers

#8 tedgie

tedgie

    Member

  • Members
  • PipPip
  • 15 posts

Posted 18 August 2008 - 06:28 AM

I get the following error when I try this:

Not Found

The server was not able to find the document (./3rdparty/rvsitebuilder/index.php/sitebuilder/sitebuilderhome) you requested.


#9 pairote

pairote

    Administrator

  • Admin
  • PipPipPip
  • 4,351 posts

Posted 18 August 2008 - 10:23 AM

Change

$sbpath = "/3rdparty/rvsitebuilder/index.php/sitebuilder/sitebuilderhome";

To

$sbpath = "/3rdparty/rvsitebuilder/index.php?/sitebuilder/sitebuilderhome";

#10 ontario

ontario

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 25 March 2010 - 01:19 PM

QUOTE(Roadrunner @ Mar 7 2006, 07:22 PM) <{POST_SNAPBACK}>
Hi,

just wondering if there is a direct link to login to the sitebuilder like www.domain.com/sitebuilder

Most of my clients never used cpanel and it would be way easier for them to access it directly.

Matt



It sounds great...great Idea