1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk Subdomain Manager 0.0.2 Beta

Discussion in 'Plesk for Linux - 8.x and Older' started by haggy, Aug 19, 2006.

  1. haggy

    haggy Guest

    0
     
    Hi Folks,
    after I went mad with the FU***** Plesk subdomain handling I wrote addon for Plesk.

    With the "Plesk Sudo Manager" you can manager your Subdomains.

    - make easy a forward
    - change the webroot to a existing dir of your "normal" webspace in "YOU/PATH/DOMAIN/httpdocs"

    In the attachment you can find the first version to test it on you maschine.

    Screenshots:
    [​IMG]
    [​IMG]

    Download:
    http://www.haggybear.de/download/sudo.zip

    Cya Haggy
     
  2. Crazy X

    Crazy X Guest

    0
     
    Wow! Exactly for what i'm searching for :)

    But i have a Problem with the function

    PHP:
    function prepareDomain($dom){
             
    $toExec "/usr/local/psa/admin/bin/websrvmng -u --vhost-name=".$dom;
         
    $createVhost str_replace("{DOMAIN}",$dom,DOCROOT)."conf/vhost.conf";

             
    exec ('./wrapper "1" "0" "'.$createVhost.'"');
         
    exec ($toExec);
    }
    for what is wrapper ? After this function there is no vhost.conf in my conf directory.

    $toExec is /usr/local/psa/admin/bin/websrvmng -u --vhost-name=mydomain.de
    $createVhost is /var/www/vhosts/mydomain.de/conf/vhost.conf
    seems both are ok...

    i see always:

    Your domain isn't prepared for the extended subdomain administration.
    Should the Plesk Sudo Manager do that now?

    Thanks for help!

    Crazy X
     
  3. haggy

    haggy Guest

    0
     
    Hi!

    The wrapper calls the vhost_writer.sh (without thats u can't write the vhost.conf)

    the the permissions of "wrapper to 4755"

    chmod 4755 wrapper

    Then it works!

    Greetings
    Haggy
     
  4. Crazy X

    Crazy X Guest

    0
     
    it don't work :(

    but, can it be that php don't allow exec ?
    because wenn i just write

    exec ('touch datei');

    there is no file named datei...
     
  5. haggy

    haggy Guest

    0
     
    Just are question?

    U are german, right?

    Then lets talk german!!

    Ist doch einfacher für beide, oder?
     
  6. Crazy X

    Crazy X Guest

    0
     
    Hab mir schon gedacht das du ne German Person bist :)

    Ich bin bei HostEurope und habe ein VPS (virtueller Server).
    bei phpinfo() steht das die safe_mode "Off" ist. Also ist da schon mal nicht das Problem.

    $result = shell_exec("ping ".$ip);
    echo "|".$result."|";

    funktioniert z.B. leider auch nicht :-(
    Wie kann ich den testen ob exec geht?

    Hast du ICQ (oder ähnliches)?

    Gruß
    Dominic
     
  7. Lonesome Walker

    Lonesome Walker Guest

    0
     
    Eh, macht doch ned immer alles per ICQ klar;
    schreibt zumindest die Ergebnisse hier nieder ;)

    Ich bin auch bei HostEurope...


    Lonesome Walker
     
  8. Crazy X

    Crazy X Guest

    0
     
    things we change:

    1. for HostEurope we need to change doit.php

    PHP:
    if($subdata["php"] == "true"){
            
    $vhost_set.= '<IfModule [B]sapi_apache2.c[/B]>\\n';
        
    $vhost_set.= '    php_admin_flag engine on\\n';
        
    $vhost_set.= '    php_admin_value open_basedir "'.str_replace("{DOMAIN}",$_GET["dom_name"],DOCROOT)."httpdocs/".$_POST["root"].':/tmp"\\n';
        
    $vhost_set.= '</IfModule>\\n';
        
    $vhost_set.= '<IfModule mod_php5.c>\\n';
        
    $vhost_set.= '    php_admin_flag engine on\\n';
        
    $vhost_set.= '    php_admin_value open_basedir "'.str_replace("{DOMAIN}",$_GET["dom_name"],DOCROOT)."httpdocs/".$_POST["root"].':/tmp"\\n';
        
    $vhost_set.= '</IfModule>\\n';
     }
    2. we change the permission of wrapper to 4755

    3. we change the Owner of the Plugin-Dir (where you put your Files inside) to root:psaadm

    4. an advise: first set your options for your subdomain in Plesk like php, perl, ... and than make changes with this plugin
     
  9. Lonesome Walker

    Lonesome Walker Guest

    0
     
    Dankeschön :D
     
  10. Crazy X

    Crazy X Guest

    0
     
    a little revision from me in the function getDocRoot in funcs.php (red is new source)

    And at the end of the file doit.php (red is new source)

     
  11. ferdinandhuber

    ferdinandhuber Guest

    0
     
    Hallo!
    Ich habe all eure Fixes gemacht aber trotzdem bekomm ich immer noch die Fehlermeldung
    Beim Daraufklicken ist erscheint sie wieder !?

    Könnt Ihr mir da helfen? Danke!

    Gruß,
    Ferdi
     
Loading...