tsiedsma Posted July 16, 2008 Share Posted July 16, 2008 I wanted to take advantage of the cPanel proxy so users could access cPanel, webmail, webdisk and WHM from behind a firewall at school or work. What I found was cPanel Proxy. Attached are all of the files you need to make this happen. I will not provide any support for this, I am only sharing my experience. STEP 1: you need to login to upload the contents of skel.zip to your /root/cpanel-skel/public_html/ directory as root on your hosting server. This should give you four new folders: whm, cpanel, webdisk and webmail. STEP 2: copy class.cpanel.php.txt to your whmcs/includes/ folder as class.cpanel.php. STEP 3: modify your actionhooks.php file and find the actionhook_AfterModuleCreate function and make it look like this: function actionhook_AfterModuleCreate($vars) { # This function runs when a module creation command completes successfully - various variables available if (($vars['moduletype'] == 'cpanel') && ($vars['producttype'] == 'hostingaccount')) { include("class.cpanel.php"); $cuser = $vars['username']; $cpass = $vars['password']; $cdomain = $vars['domain']; if ($cpanel = new cpanel($cuser,$cpass,$cdomain)) { $cpanel->CreateSubDomain("cpanel",$cdomain); $cpanel->CreateSubDomain("webmail",$cdomain); $cpanel->CreateSubDomain("webdisk",$cdomain); $cpanel->CreateSubDomain("whm",$cdomain); } } } Now whenever a new customer registers, when the system creates their cpanel account, the subdomains will be automatically created. If you find a way to improve on this, please feel free to share. Note: If you aren't using the x3 theme as your default theme, you will need to modify line 9 of class.cpanel.php with your default them. skel.zip class.cpanel.php.txt 0 Quote Link to comment Share on other sites More sharing options...
zippohosting Posted September 17, 2008 Share Posted September 17, 2008 Hi, do you now how it can create SUB DOMAINS on the server - is there anything out there? 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted September 17, 2008 Share Posted September 17, 2008 Hi, do you now how it can create SUB DOMAINS on the server - is there anything out there? Look in the source for class.cpanel.php function CreateSubDomain($subdomain,$domain) { @file("http://".$this->set_username.":".$this->set_password."@".$this->set_domain.":".$this->set_port."/frontend/".$this->set_theme. "/subdomain/doadddomain.html?domain=".$subdomain."&rootdomain=".$domain); } function DeleteSubDomain($subdomain,$domain) { @file("http://".$this->set_username.":".$this->set_password."@".$this->set_domain.":".$this->set_port."/frontend/".$this->set_theme. "/subdomain/dodeldomain.html?domain=".$subdomain."_".$domain); } 0 Quote Link to comment Share on other sites More sharing options...
zippohosting Posted September 17, 2008 Share Posted September 17, 2008 I meant "Parked Domains" we have a lot of clients who want these - and we always have to go in AFTER the fact and create a domain addon... We would love for WHMCS to allow for someone to order a PARKED DOMAIN and have the server create it... Cpanel of course.... 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted October 7, 2008 Share Posted October 7, 2008 That would require a lot of core cpanel module updates. Such as after account login to pay, an action to ask should this be a new hosting account or an addon-domain to existing cpanel account user, check if that feature is available for that package and if max addon-domains has already been reached in which an addon to sale additional addon-domain package upgrade. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted October 7, 2008 Share Posted October 7, 2008 I meant "Parked Domains" we have a lot of clients who want these - and we always have to go in AFTER the fact and create a domain addon... Why cant the client just click "parked domain" in their control panel ??? 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted October 7, 2008 Share Posted October 7, 2008 It depends how IT literate your customer is. A lot of ours are small business types with low literacy, they just want to pay us to do the whole thing. I'd kind of like the ability to do this from WHMCS too, esp if I could arrange for it to just 302-redirect to the main domain - would be heaven 0 Quote Link to comment Share on other sites More sharing options...
kitchen8695 Posted March 31, 2009 Share Posted March 31, 2009 Is This still needed "Auto PARKED DOMAIN" within WHMCS? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.