PDA

View Full Version : Cmd_api_custom_httpd



michael
09-13-2010, 03:07 AM
Hi Guys,

I'm writing some scripts to automatically create and configure accounts on the server with email, database, dns, ftp, etc. This uses basically all API functions available and working quite good.

However, I can't seem to get the CMD_API_CUSTOM_HTTPD function working. This always returns the current config and never update it with the supplied value. It is also the only one without an 'action' or likewise parameter: http://www.directadmin.com/features.php?id=580


array(
config => '# test',
domain => $Domain
)

How can I get this to work? The connection and command is correct since I receive the current configuration. So it is not a login problem.

I could also just 'hack' it into the "/usr/local/directadmin/data/users/username/domains/domain.com.cust_httpd" file. But I'm unsure how to get this acknowledged by Apache after changing the file.

Thanks!
Michael

DirectAdmin Support
11-03-2010, 10:27 PM
Hello,

Run DA in debug mode, along with the "| grep string" option:
http://help.directadmin.com/item.php?id=293

Call the normal command through your browser, then do the same thing again with your script.

DA will spit out what's being passed.
The CMD_API_CUSTOM_HTTPD and CMD_CUSTOM_HTTPD will use the exact same variables, so you'll be able to see what you're missing vs the browser's submission.

John