Some Question (2443, XML-RPC...)

Hello.

Please excuse me English, I’m from Switzerland, and I don’t speak english very well :slight_smile:

I have an Interworx Panel installed on my Server. But, I can’t use it if I’m on my school (I’m in Ingenering University as a student), because they are block the port 2443 :frowning:

My questions are:

  • Is it possible to change the port to use Interworx? How?

  • Is it possible to access webmail and phpmyadmin without using the port 2443 (If not, I thing it’s a good think to add this, no?)

  • I know that I can access and change some information in the Nodeworx modul (and probably the Siteworx too) using th protocol XML-RPC, as create a new account. Is it already possible with SOAP ? And could you send me the important informations for that?

I thank you for your answer.

Onet

Hi Onet-

> Is it possible to change the port to use Interworx? How?
Yes, but it may not help, depending on what ports the University has open. For example, you won’t be able to change it to port 80, as that would affect the system apache instance and all of the siteworx accounts on the box.
To change the port InterWorx runs on, two files must be edited:

NOTE- BE VERY CAREFUL EDITING THESE FILES

/home/interworx/etc/httpd/httpd-custom.conf
In this file, change all instances of 2443 to the port you wish to use. There should be two instances.

/etc/httpd/conf.d/iworx.conf
Again, change all instances of 2443 to the port you wish to use. There should also be two instances in this file.

After those two files are modified you need to restart both iworx and httpd via the following:
service iworx restart
service httpd restart

>Is it possible to access webmail and phpmyadmin without using the port 2443?
webmail, phpmyadmin, and InterWorx all run on the same port. If you changed the port as in the directions above, you can access webmail and phpmyadmin using that port.

>Do you support SOAP as well as XML-RPC?.
Nope, our API is currently accessed via XML-RPC only.

–Dustin

Hello,

Thank you for your reply, who asnwer at some of my question. THe last one (for these instants!):

Where Can I found some information for developping an interface using XML-RPC (note for the language, but for the information that I must send in the server) ?

Thank you very much

Onet

Sorry, I misunderstood your last question, I thought you were asking about where to find SOAP examples :slight_smile:

As for XML-RPC docs and examples, you can check out our API PDF for the basics. It can be found at http://interworx.info/iworx-cp/support/docs/iworx-cp-api.pdf

If you have further questions, we’ll be happy to help get you started.

–Dustin

Thank you for all :slight_smile:

No problem, I see that I’ve not explain exactely what I want :slight_smile: It’s not very easy to explain what I really want in English.

I try to do that, and I come back if I’ve some problem.

Onet

onet,

If you don’t want to change the ports for nodeworx/siteworx and want the front-end apache to handle this, please take a look at this thread:
http://interworx.info/forums/showthread.php?t=594

I use proxypass to solve this and had the same problem as you because limits in customer firewalls.

rgds
-tsl-

hi,

I am unable to get this pdf file, there is no pdf file there, can you check and cofirm me please.

i need he api’s very urgently.

Thanks:(

Venugopal,

We removed the API link from our website because that document is extremely out-of-date and we are currently working on the new, more extensive, API documentation.

If you really need it, please private message me with your email address and I can send you the (old) API document.

Socheat

Hello

For those whom are interesting to use the Iworx Api to create Siteworx account here is how I use the iworx.createaccount API.

It is not Up to date, some of new iworx functionalities are not in (billing day, sxriptworx, …)

For me, when a user pay from my web site I register all informations in a database.
Then I have a cronjob that runs every 5mn which read the database, and create the new account by calling the API


require_once( 'xmlrpc-request.php' );

$hostname_1 = 'my.hostname1.com';
$access_key_1 = "
                         copy/paste you access key here
";

$hostname_2 = 'my.hostname2.com';
$access_key_2 = "
                         copy/paste you access key here
";

// etc...

// Read the database here
// Move data from database to local variables here 

$id = $donnees['id'];
$ai_pseudo = $donnees['pseudo'];    //pseudo of siteworx account
$ai_email = $donnees['email'];         // email of siteworx account 
$ai_passwd = $donnees['password'];    //password of siteworc account
$ai_domaine  = $donnees['domaine'];    //domaine of siteworx account
$ai_ip = $donnees['ip'];    // IP of siteworx account
$LG_OPT_STORAGE = $donnees['storage'];     // 999999999 = illimited
$LG_OPT_BANDWIDTH = $donnees['bandwidth'];    // 999999999 = illimited
$LG_OPT_EMAIL_ALIASES = $donnees['email_aliases'];    // 999999999 = illimited
$LG_OPT_EMAIL_AUTORESPONDERS = $donnees['email_autoresponders'];    // 999999999 = illimited
$LG_OPT_EMAIL_BOXES = $donnees['email_boxes'];    // 999999999 = illimited
$LG_OPT_EMAIL_GROUPS = $donnees['email_groups'];    // 999999999 = illimited
$LG_OPT_FTP_ACCOUNTS = $donnees['ftp_accounts'];    // 999999999 = illimited
$LG_OPT_MYSQL_DBS = $donnees['mysql_dbs'];    // 999999999 = illimited
$LG_OPT_MYSQL_DB_USERS = $donnees['mysql_db_users'];    // 999999999 = illimited
$LG_OPT_POINTER_DOMAINS = $donnees['pointer_domains'];    // 999999999 = illimited
$LG_OPT_SUBDOMAINS = $donnees['subdomains'];    // 999999999 = illimited
$LG_OPT_CGI_ACCESS = $donnees['cgi_access'];    // False or True
$LG_OPT_CRONTAB = $donnees['crontab'];    // False or True
$LG_OPT_RESOLVE_XFERLOG_DNS = $donnees['resolve_xferlog_dns'];    // False or True
$LG_OPT_SSL = $donnees['ssl'];    // False or True
$LG_OPT_BURSTABLE = $donnees['burstable'];    // False or True
$LG_OPT_SAVE_XFER_LOGS = $donnees['save_xfer_logs'];    // False or True

// depending of the server IP I have not the same access_key and hostname	
// if IP = xxx then move server data else move other server data
if (substr($ai_ip,0,9) == 'xx.xxx.xx') {
	$access_key = $access_key_1;
	$hostname = $hostname_1;
}
else if (substr($ai_ip,0,3) == 'xxx') {
	$access_key = $access_key_2;
	$hostname = $hostname_2;
}
	
	 
$message = array('access_key' 	=> $access_key,
	            'account_info'	=> array ( $ai_pseudo, 
                                             $ai_email, 
                                             $ai_passwd, 
                                             $ai_domaine, 
                                             $ai_ip),
	            'features_list' => array ('LG_OPT_STORAGE' => $LG_OPT_STORAGE,
                                          'LG_OPT_BANDWIDTH' => $LG_OPT_BANDWIDTH,
                                          'LG_OPT_EMAIL_ALIASES' => $LG_OPT_EMAIL_ALIASES,
                                          'LG_OPT_EMAIL_AUTORESPONDERS' => $LG_OPT_EMAIL_AUTORESPONDERS,
                                          'LG_OPT_EMAIL_BOXES' => $LG_OPT_EMAIL_BOXES,
                                          'LG_OPT_EMAIL_GROUPS' => $LG_OPT_EMAIL_GROUPS,
                                          'LG_OPT_FTP_ACCOUNTS' => $LG_OPT_FTP_ACCOUNTS,
                                          'LG_OPT_MYSQL_DBS' => $LG_OPT_MYSQL_DBS,
                                          'LG_OPT_MYSQL_DB_USERS' => $LG_OPT_MYSQL_DB_USERS,
                                          'LG_OPT_POINTER_DOMAINS' => $LG_OPT_POINTER_DOMAINS,
                                          'LG_OPT_SUBDOMAINS' => $LG_OPT_SUBDOMAINS,
                                          'LG_OPT_CGI_ACCESS' => $LG_OPT_CGI_ACCESS,
                                          'LG_OPT_CRONTAB' => $LG_OPT_CRONTAB,
                                          'LG_OPT_RESOLVE_XFERLOG_DNS' => $LG_OPT_RESOLVE_XFERLOG_DNS,
                                          'LG_OPT_SSL' => $LG_OPT_SSL,
                                          'LG_OPT_BURSTABLE' => $LG_OPT_BURSTABLE,
                                          'LG_OPT_SAVE_XFER_LOGS' => $LG_OPT_SAVE_XFER_LOGS)
	    );

// Send the XML request (note that you may also use port 2080 and http)
$result = xmlrpc_request( $hostname, '2443', 'https', 'iworx.createaccount', $message, 0 );
	
if ($result == "SUCCESS" )
{ 
      // Your success code here (ie . send confirmation email to siteworx client)
}


Hope it may help some of you

Pascal