In Progress [CPANEL-24040] Using whmapi1 set_service_config_key with Apache

jmginer

Well-Known Member
Jul 26, 2006
129
1
168
Alicante
cPanel Access Level
Root Administrator
Hello,

I run this command:

Code:
whmapi1 set_service_config_key api.version=1 service=apache key=startservers value=10
The result resturn OK

Code:
---
metadata:
  command: set_service_config_key
  reason: Succeeded
  result: 1
  version: 1
But nothing's changed when I connect to the WHM > Apache > Global conf

What I'm doing wrong?

Thanks!
 

Infopro

cPanel Sr. Product Evangelist
Staff member
May 20, 2003
17,063
501
613
Pennsylvania
forums.cpanel.net
cPanel Access Level
Root Administrator
Twitter
Well, I'm thinking about this mesaage, there:
Warning:
As of cPanel & WHM version 58, only the dovecot service is compatible with this function
I assume then that, service=apache, is not compatible. No clue if I'm correct here or not though, just going by what I read on that docs page.
 

jmginer

Well-Known Member
Jul 26, 2006
129
1
168
Alicante
cPanel Access Level
Root Administrator
Strange, the get_service_config function in the documentation also says that it only works with dovecot, but it does return Apache results correctly.

WHM API 1 Functions - get_service_config - Developer Documentation - cPanel Documentation


Code:
# whmapi1 get_service_config service=apache
---
data:
  defaultvhost:
    userdirprotect: -1
  main:
    directory:
      options:
        directive: options
        item:
          options: ExecCGI FollowSymLinks IncludesNOEXEC Indexes
    directoryindex:
      directive: directoryindex
      item:
        directoryindex: index.php index.php5 index.php4 index.php3 index.perl index.pl index.plx index.ppl index.cgi index.jsp index.jp index.phtml index.shtml index.xhtml index.html index.htm index.wml Default.html Default.htm default.html default.htm home.html home.htm index.js
    documentroot:
      directive: documentroot
      item:
        documentroot: /usr/local/apache/htdocs
    extendedstatus:
      directive: extendedstatus
      item:
        extendedstatus: 'On'
...

Then, can tell me how I can automate the implementation of the configurations?

* Apache Global Configuration
* Exim Configuration
* FTP Server Configuration
* Backup Configuration

Thanks!
 
Last edited:

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,749
2,205
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @jmginer,

Internal case CPANEL-24040 is open to address an issue where the set_service_config_key WHM API 1 function accepts Apache as an input parameter for service despite the apparent intended limitation of this function to the Dovecot service. I'll monitor this case and update this thread with more information as it becomes available.

can tell me how I can automate the implementation of the configurations?

* Apache Global Configuration
* Exim Configuration
* FTP Server Configuration
* Backup Configuration
You may find the cpconftool script useful as an alternative for all of the quoted configurations (except for FTP):

The cpconftool Script - Version 82 Documentation - cPanel Documentation

For FTP, the instructions on the document below are applicable:

FTP Server Configuration - Version 82 Documentation - cPanel Documentation

Let me know if this helps.

Thank you.