Virtualmin API Seems to Force Apache Restart Rather Than Graceful


I am using WHMCS to connect to the Virtualmin API to create Virtual Servers and accounts. I’m experiencing an error where the accounts are trying to be created twice in WHMCS, but Virtualmin is kicking back on the second to say it’s already been created (which it has, so that makes sense). After some debugging with WHMCS, we’ve determined we think Virtualmin, after the server has been created, may be forcing an Apache restart rather than doing a graceful restart, which is breaking the connection from WHMCS and causing it to send the order again.

How can we verify if Virtualmin is doing this, and does this sound like something Virtualmin would do? How could I configure the API to do a graceful restart instead? Thank you for your help.


If you take a look in Webmin -> Servers -> Apache -> Module Config -> System Configuration, what is “Command to apply configuration” set to?


It was set to use apache2ctl graceful.

I realized the problem was that my WHMCS installation and Virtualmin configuration were on the same server, and the Virtual Server running WHMCS was set to use FCGI, so the connection was being terminated even on a graceful reboot. I changed this to use CGI instead and have had no further problems.