Remote API/Command line API: Possible to change the Apache Server Document Root?

SYSTEM INFORMATION
OS type and version Ubuntu 16.04.7 LTS
Virtualmin version 6.15

Hi,
Is it possible to change an Apache Server → Virtual Server’s DocumentRoot through remote API?

I know about going into the text file through the Virtualmin interface, i.e.
Webmin → Servers → Apache Server → Virtual Server → Edit Directives
and modifying there, but I’m wondering if it’s possible to do it through the Remote API / Command line API?

On a different related question, are Webmin actions generally not available on the “VirtualMin Command Line API”?

Help much appreciated!

Edit: added the System Info

Hello,

First of all consider upgrading as Ubuntu 16.04 is far beyond EOL. Also, latest Webmin version is 1.994 and latest Virtualmin version is 7.1.

Please refer to this manual for getting more details on remote Virtualmin API.

The correspondent CLI command that you’re looking for is:

virtualmin modify-web --domain example.com --document-dir new_public_html

Ah thank you!

Will look into the updates to Webmin / Virtualmin, as per your suggestion.

Thank You for the corresponding CLI command, i was actually already referring to the Command Line API documentation, (and the Remote API as well), just that i couldn’t equate/ find / know that that specific “modify-web” + “document-dir” was what i needed.

Thanks again! :heart:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.