Control Panel

Discussion in 'Installation and "How-To" Questions' started by spirits, Nov 15, 2007.

  1. spirits

    spirits Guest

    How do i make the control Panel visible that someone can get into the panel from our website. The Website is not online yet for public. Our Company is just testing.
    Could someone pls explain me how it works. I think that there must be a way to set the login (i.e. an link) to our HSP Console Website that users (admins) can login from there to the Control Panels. If i understand there are some kinds of Panels.
    As one of our Technical engineer explains there must be open some ports to get the acces? But how do i implement the login to our Website?

    Pls excuse for logical faults. But i try to understand the system.

    Regards
    Al
     
  2. vbatraev

    vbatraev Odin Team

    Messages:
    346
    Could you please clarify what exactly you want to do:
    either add link to your Website from HSPcomplete Control or add link to HSPcomplete Control Panel from your Website?
    If first, please read "Adding Custom Items to Control Panel Menu Panel" section in HSPcomplete SDK,

    else you should add the CP link ("http(s)://hostname/cp") to your Website.
    If you know user credentials, you may write a script to log in CP automatically bases on example below.

    Here is a sample of login1.cgi script, which submits data to real cp login script:

    Code:
    #!/usr/bin/perl
    use strict;
    use HSPC::WebSystem;
    use HSPC::WebSystemLib;
    
    HSPC::WebSystem->run(1,init_person=>1,LOGIN_REQUIRED=>0);
    
    my $panel = $ENV{q}->param("panel");
    
    my $url = "https://" . $ENV{SERVER_NAME} . "/cp/login.cgi";
    my $login = 'root@provider.com';
    my $password = 'qwerty';
    
    sw_web_http_header();
    print <<FORM;
    <html>
    <script language="JavaScript">
    setTimeout('document.loginform.submit()',0);
    </script>
    <body>
    <form target="_top" method="post" id="loginform" name="loginform" action="$url">
    FORM
    print $ENV{q}->hidden("Name", $login) . "\n";
    print $ENV{q}->hidden("password", $password) . "\n";
    print $ENV{q}->hidden("Save", " Sign in ");
    print <<FORM;
    </form>
    </body>
    </html>
    FORM
    
    *Put this script to /var/opt/hspc-root/ directory and set up correct owner and permissions:
    #cd /var/opt/hspc-root/
    #chown apache:apache login1.cgi
    #chmod +x login1.cgi
    *Add "http(s)://hostname/login1.cgi" link to your Website.

    This script redirects to real cp login form and tries to log in using using credentials specified.
    If you haven't enable ssl on your hspc server, please change https to http in the login1.cgi script.

    Please let me know if you have any further questions.
     
  3. KrazyBob

    KrazyBob Mega Poster

    Messages:
    225
    I have a slight variation of this question.

    How do I pass parameters to the login script so that customers may specify the3ir email address and password from a script on our web site and log directly into HSP 3.3.3? We have found that our customers a4re easily confused by the numerous ways to login to HSP or Plesk.
     

Share This Page