Jump to content

Virtualmin Remote API help


fta

Recommended Posts

How do i set this up https://MYserver:10000/virtual-server/ remote.cgi.

I get this error ERROR: You are not allowed to run remote commands

 

How do and what do i do to fix this error I am running my website in cgi mode (mod_cgi mod_perl mod_php5 ) Curl is installed and working I tried host.allow virtualmin: myserver,com :allow I no its a permission thing but where do i fix them at (how to) i am Testing WHMCS with Virtualmin before i buy. Everything works perfect except the Remote calls to the server I need a working example and any permission fix

Any help would be most appreciated thanks

 

-------------------------------------------------------------------------------------

wget--http-user=root --http-passwd=xxxx 'https://MYserver:10000/virtual-server/remote.cgi?program=list-domains'

https://yourserver:10000/virtualserver/remote.cgi

https://yourserver:10000/virtualserver/remote.cgi?program=listdomains

 

The html url above throws ERROR: You are not allowed to run remote commands

The above Wget works on command line not in the server setup parameters in the whcms I need to no what settings to put into the server config > Servers Edit Server

I am running WHMCS on same linux server as virtualmin is

USE https box is checked

------------------------------------below is server edit settings------------------------------

Name server66

 

Hostname server66.com:10000/virtual-server/remote.cgi

 

IP Address 55.67.160.44:10000

 

for hostname i tryed > server66.com:10000/virtual-server/

 

server66.com:10000/

 

server66.com:10000/virtual-server/remote.cgi?program=create-domain

 

Command line works perfect but from whmcs i get ERROR: You are not allowed to run remote commands

-----------------------------------Virtualmin api rules----------------------------------------------------------- Remote API

The rules set forth in virtualmin documentation state All remote calls must be made through the CGI /virtualserver/ remote.cgi. The full URL for this will be .https://yourserver:10000/virtualserver/remote.cgi, where yourserver is the full hostname or IP address of the system running Virtualmin. This URL must be provided with at least one parameter named program, whose value must be the name of the commandline program to invoke, without the .pl extension. So a possible URL to request would be: .https://yourserver:10000/virtualserver/remote.cgi?program=listdomains. Because most commandline programs require additional parameters, these must be included in the URL. Every CGI parameter is converted to a commandline parameter, with the value of the parameter appended if given. For example, to create a mail alias, you could invoke the URL: .https://yourserver:10000/virtualserver/remote.cgi?program=createalias&domain=foo.com&from=sales&to=joe@foo.com To specify a parameter that does not have anything after it, just add a CGI parameter with no value. For example, to list databases in detailed form, you could call: .https://yourserver:10000/virtualserver/remote.cgi?program=listdatabases& domain=foo.com&multiline= Both GET and POST format HTTP requests can be used. If your Virtualmin server is not running in SSL mode, use .http:// instead of https:// in the URL.

Thanks for any help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated