Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a VPS (CentOS) with CPanel and Suphp enabled. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ mod_fcgid/2.3.5

As a root I created an account and set up a domain for it. Now I can login to this account's CPanel and create addon domains. For my project I want to allow the visitors of my website to do same thing (create addon domains) from my PHP script.

I'm a PHP developer and I have a very limited Linux administration experience. I can use system() or similar PHP function to call a command file, but what this command file should contain? I believe there must be some user authorization and the necessary stuff to change config files... Please advise.

Thank you.

share|improve this question

closed as off-topic by HopelessN00b, MadHatter, bangal, HBruijn Feb 26 at 10:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

OK, figured this out. With CPanel it's very easy actually: it provides the API for administrative tasks.

But what if I don't have CPanel? Many VPS hosters either don't offer CPanel option or require additional monthly fee for it. What can be done to automate creating addon domains in this case?

Thank you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.