Web Hosting Talk







View Full Version : [FREE] Hosting Control Panel (GPL)


tazzy
03-30-2003, 05:44 PM
Hello,

I've been working on a small hosting control panel for sometime. I'm just working on demand now. I want to know if there is enough demand and interest for another control panel. This will be 100% free and open source. Frontend Coded in PHP 5.8 or PHP 4.3. MySQL usage ready and also some shell usage. Basically i'm going to make it easy as possible to modify.

Panels:
Server Admin Control Panel

Server Admin Control Panel:
Server Settings
Shutdown/Restart Server
Change root password
View top
View server configuration
Edit resolv.conf
Stop/Restart Apache
Edit httpd.conf
Stop/Restart Bind
Stop/Restart MySQL
Edit my.conf
View server load

Obviously its 100% free and will be editable. Non-encypted code. Any suggestions?

Requirements:
Red Hat Linux 7.3/8.0
PHP 4.3.1 (For PHP Version):
PHP Safe Mode = OFF
Apache 1.3.27
Perl 5.8 (For Perl Version)
MySQL 3.x
Bind 9.1
Sendmail

What i've done so far:
Server Admin Control Panel - 0% / 0%
Last Updated: 00:40 GMT+0 31/4/2003


PHP
Version: 0.1
Type: Alpha
Written config.php file using $cfg['value'] to define configuration settings.
-----------------------------------
Re-written: index.php now displays a virtual option menu. Server Admin CP, User Admin CP. It also provides a link to login and update profile.
-----------------------------------
Re-written: login.php now looks for $user in $db and if $registered then check $db->$status and if $status->user then $goto->usercp or $status->root then $goto->admincp else ERROR: User status has not been assigned. It also sets either a $user or $rootadmin cookie.
-----------------------------------
Re-Written admin.php to check for $user and $status in $db and if $status = admin then { } elseif $status = user echo "Sorry you only have admin"status." Now able to define custom referance logins and limit logins also by IP and Cookie.
-----------------------------------
Re-written status.php to check for server usage (cpu,memory,swap,hdd) and also ports if they are "opened" or "closed". With e-mail feature if return $closed or *% of server usage.
------------------------------------
Re-written: mysql.php now checks for cookie and looks for $user and $status and { } depending if $status = admin and $user = root and will display all databases. READ ONLY.
-------------------------------------
Re-written logs.php to check for $server.admin cookie and if not found then print custom error. When login completed will display { }.
--------------------------------------
Written update.php to use shell script to wget "localhost/latestfile.zip" and unzip and vi "versionid.dat" and print content into page. Step Process. Also displays current version.
---------------------------------------
Written install.php to write to config.php with predefined values. Also connects to DB and sets up tables and imputs some data. Runs test by "SELECT * from settings WHERE install=yes" which shows that its online and to go onto next phase by saving the config.php settings.
----------------------------------------


PHP Files and what they do
admin.php - Admin Panel
auth.php - NEW: Auth system
config.php - Configuration settings
dns.php - View dns zones
ftp.php - View ftp accounts
install.php - install script & set settings
login.php - Log in user or admin
logs.php - view logs
index.php - main page
manager.php - Manage accounts
mysql.php - view all mysql dbs
signup.php - create account without root
status.php - view server status
update.php - to update cp


---------------------------------------

Perl


Perl files and what they do

More to come :)

Going well so far. However still a lot to do. By far the hardest part will be using system() to run commands which require "root". I will have to read up on that. Also, working on bandwidth limit using mod_bandwidth --> will have to learn how to use mod_bandwidth.


Please suggestions if you have any. :)

rusko
03-30-2003, 06:05 PM
a lot of people would be interested, but i suggest picking the license carefully. gpl may not be the best option since whoever modifies the code will have to release the patches. on the other hand, if its released under a bsd-ish license, people could turn around and sell it.

try to make the code as readable/modular as possible please =]

paul

tazzy
03-30-2003, 06:07 PM
Hello,

Do you have any preferenace for storing the actual information such as server configuration? Also, what about intergrating with billing software?
What about email software?

I'm going to start work on the actual server setup so it can run on a server and the root user can login. This may take sometime. :)

blacknight
03-30-2003, 06:19 PM
IMHO a good control panel should be flexible.
FTP - enable/disable access - multiple daemon config
Mail - allow a choice on the server-side if possible
Billing - allow user defined CC processors
Languages - if possible allow more than one language
Template - modular

SoftWareRevue
03-30-2003, 06:32 PM
I say, take what you have now and run with it. Once you get all that stable, then you can add more features.

Incognito
03-30-2003, 06:45 PM
I say, take what you have now and run with it. Once you get all that stable, then you can add more features. But, what he has now is 0% in all areas. Although your advice may still be appropriate, just not as you intended.

SoftWareRevue
03-30-2003, 06:56 PM
Yeh. I guess I should have mentioned to just focus on the basics. :)

tazzy
03-30-2003, 06:58 PM
Originally posted by Incognito
But, what he has now is 0% in all areas. Although your advice may still be appropriate, just not as you intended.

Hello,

Actually. I've been working on scripts. I probably should have added all the scripts which will be part of the actual control panel. :eek:

tazzy
03-30-2003, 07:23 PM
. Updated first post instead.

SoftWareRevue
03-30-2003, 08:22 PM
Don't try and finish it today. And please don't announce a release date. :D

rusko
03-30-2003, 08:26 PM
tazzy,

a couple more points:
1. support for less popular but better daemons, such as powerdns, qmail, postfix, pureftpd, popa3d etc.
2. all configuration files should be in xml
----
extra stuff
---
3. all major functionality should be available through an xml-based rpc api.

indeed, as swr said, focus on getting the groundwork done first. however, make sure you spend enough time designing the system.

good luck,
paul

tazzy
03-30-2003, 08:28 PM
Originally posted by SoftWareRevue
Don't try and finish it today. And please don't announce a release date. :D

Well.... I suppose I could release it tommorrow..... joking -> :D

tazzy
03-30-2003, 08:30 PM
Originally posted by rusko
tazzy,

a couple more points:
1. support for less popular but better daemons, such as powerdns, qmail, postfix, pureftpd, popa3d etc.
2. all configuration files should be in xml
----
extra stuff
---
3. all major functionality should be available through an xml-based rpc api.

indeed, as swr said, focus on getting the groundwork done first. however, make sure you spend enough time designing the system.

good luck,
paul

Hello,

Well. I will look into it. I'm pretty busy for a bit. Got to get work related thingys sorted. This is just going to be a project for me to learn php basically. I'm doing okay. :) I will add to it when I can. Hopefully 0.1 alpha will be out sometime this week or next week maybe. I really have no clue. :)

Edited:
PureFTPd --> Can do that.

However not sure about the rest. I haven't really looked into either DNS or FTP editing using PHP. So i'm open to suggestions for usage. I'm just getting the actual cp itself running. Outside connections can be done later. The cp needs to have a stable and fast interface and making good work of modules. Its open source, so hopefully once I release 0.1 Alpha --> alpha tests can test it. Then beta. Then stable for open source developers. :)

djmoyle
03-31-2003, 12:05 AM
tazzy, i would be very interested in the control panel when you are done making it and i would gget many people to use it if its free. good job sofar:)

Mdot
03-31-2003, 06:40 AM
two suggestions:

1) Don't use PHP, use Perl instead. PHP has less functions and it is pretty limited. Perl has much more features and it is modular.

2) Try to avoid use of suid scripts, make configs rw from the user control panel runs.

Of course I have more suggestions, but the list would be too long. Main suggestion is to keep security first - any responsible admin will never trade security for anything else (personally, I prefer console to any control panel).

tazzy
03-31-2003, 07:26 AM
Hello,

My knowledge of perl is very very limited. I will however write a perl version. :) I believe it will be easier to write the actual cp in perl with respect to running commands as root and so on. However, I know more php. So i'm having a go at that first. :)

tazzy
03-31-2003, 09:35 AM
Hello,

Due to what someone said. I have decided to scrap both the non-root and user cp and leave a porting system easy to use. S o you can easily add your own. The control panel will basically include some shell scripts to do small jobs aswell. Such as recompiling apache/php/mysql. Also editing httpd.conf,php.ini,my.cfg. Any suggestions are good :)

SoftWareRevue
03-31-2003, 09:40 AM
Originally posted by tazzy
. . . . . . Any suggestions are good :) Less posting. More coding.









:D

tazzy
03-31-2003, 09:42 AM
Originally posted by SoftWareRevue
Less posting. More coding.









:D

I have to re-write the majority of the frontend due to my removal of the 3 levels and also the DB backend. Also because I said I would make it easy to modify. :bawling: All because of a certain person... :angry: :uzi:

SoftWareRevue
03-31-2003, 11:24 AM
Maybe I should expand my suggestion to include, "Less talking on IMs." :emlaugh:

tazzy
03-31-2003, 01:56 PM
Originally posted by SoftWareRevue
Maybe I should expand my suggestion to include, "Less talking on IMs." :emlaugh:

:bawling:

JustinH
04-01-2003, 03:20 AM
Originally posted by Miha
1) Don't use PHP, use Perl instead. PHP has less functions and it is pretty limited. Perl has much more features and it is modular.


I won't trash this thread by asking you to list all these great features that Perl has and PHP doesn't, but wouldn't be a bit silly to rewrite everything he's done so far in a different language, because it "has more functions"?

As for suggestions: simple and modular as mentioned. Let the admin be in control of a lot of it. I did like the post about support for lots of services, but being experienced with Qmail I'd definately scratch that off the list :D.

tazzy
04-01-2003, 02:18 PM
Hey,

Any suggestions for the email side?

JustinH
04-01-2003, 03:10 PM
Like webmail or the service? Service is easy, Exim. Webmail is also pretty easy horde :D. Unless of course you're going pop3 (horde uses IMAP).

tazzy
04-01-2003, 04:26 PM
Hello,

Okay, so far:
Web Server: Apache 1.3.27 & 2
DNS Server: Bind DNS 9.1
SQL Server: MySQL 3 & 4
Mail Server: Exim
FTP Server: Pure-FTPd