Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

How can i make my own hosting control panel/linux control pa

Apr 28, 2016 6:51AM PDT

Anyone tried to make a hosting/server control panel like zpanel ,ispconfig,ajenti ? i know php and how can i controll apache with php like add vhost edit apache rewrite mod . also add domains ? only php and mysql can i do it ?

Discussion is locked

- Collapse -
Answer
RE: control panel
Apr 28, 2016 7:08AM PDT

From zpanel.com: " ZPanel is written in PHP". And "The ZPanel project consists of team members from all over the world as well as a growing amount of users from the community that have designed and developed both third-party modules, themes and translations for ZPanel

So the answer to your question is: "They can together in PHP, but that doesn't necessarily mean you can all alone."

- Collapse -
Answer
I would use a framework for that
May 5, 2016 8:55AM PDT

If you want to use PHP and MySQL, you can use something like Laravel to build this. Laravel will provide tools from templating the UI, reading and writing files, authentication, and it's all very REST-ful, meaning you could later even expose an API.

- Collapse -
Answer
You can try of course
Jun 9, 2016 10:51AM PDT

I think that almost everyone did try to write his own control panel or some sort of that.
It's not so hard: create a PHP page with some user interface and hook up the PHP function 'exec' with them.

It should word the same way as you do it with your hands on the console.
So you if need to install apache+php+mysql you should execute something like that:

apt-get install apache2 php5 php5-mysql mysql-server mysql-client

And if you create a big button 'install LAMP' and trigger executing the same commands after pressing that it will make the same.

It can be done, but you surely will face the same problems as all of us.

You'll need some authorization system.
You'll need to track if that software already installed.
You'll need to made changes to configuration files and make sure that new changes didn't break something.

It's a good way to practice in the PHP programming by the way Happy

Either way you have to look at well known projects like WebMin, ServerSuit or http:/VestaCP.