Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004

    Homemade Control Panels

    My company hosts only the sites that we design (as well as our personal sites on the comp of course). I am designing a control panel for our customers in PHP.

    Since we are not a hosting reseller, and we don't provide SSH access or FTP logins, the control panel does not need a lot of functionality. The only necessary features that I can think of are various types of trouble tickets, a link to web-based email, content management system, link to AWStats, billing history, contact information, and system messages.

    The one thing that I don't know how to integrate into my control panel is email administration (I am using postfix), namely adding and removing POP3 accounts and aliases and changing passwords. Well that and maybe a bandwidth meter.

    For my part I use webmin to manage the server, and I manage the various sites with Virtualmin, but I don't know how to integrate that into my control panel.

    Some of the third-party control panels I've looked at like cpanel seem to be geared more towards hosting resellers, where you'd need managers for things like files, directories, subdomains, and various httpd.conf customizations. Thus I don't know if it's worth the investment since the vast majority of its tools I won't need; I really only need an email manager. I don't need a file manager or a MySQL interface or a way to add cron jobs or any of those sorts of things.

    I would like an email manager to appear in my panel with the same look and feel alongside the custom apps I'm making (change requests, content management, trouble reports, etc) without having to redirect to a different site or enter another password. In a perfect world I would like this to be integrated with Virtualmin too but that's probably asking too much. Complicating matters some is that I really don't know perl or cgi that well, having used it once in college in 1997.

    I was considering having the email management form send the info to a database for me to add into virtualmin later, but that's slow for the user and impractical in the long run besides. We are just starting out and none of our first few customers needed email service from us (for other reasons, not because of a lack of an email control panel). The only two domains we are handling email for currently are our company's (managed through postfix directly) and my personal domain (managed in virtualmin), but that is going to change in the next three or four weeks.

    What are my options? Can I add this functionality to a panel of my own design, or should I just get a 3rd-party panel and add the trouble report form into that? I really just need the email piece. I am on Linux (CentOS 3.5) and am running PHP 4.3.9, SunONE ASP, MySQL 4.1.17, Webmin 1.16.0, and Postfix 2.1.5.

    Thanks for any ideas (and sorry for making this so long).

  2. #2
    Join Date
    Oct 2004
    Brisbane, Australia
    I have never fiddled round with postfix, but i can sorta help you out with the bandwidth meter.

    If all you want to monitor is the amount of traffic put out through Apache (not including ftp traffic etc), which is what many control panels do, look in your httpd.conf for your common access log path.

    For me on my PowerMac G5 it is /private/var/log/httpd/access_log and /error_log.

    Now all you have to do is get the data from those files like so:
    BigMac:~ Elliot# cat /private/var/log/httpd/access_log - - [18/May/2005:10:40:10 +1000] "GET / HTTP/1.1" 200 1456 - - [18/May/2005:10:40:12 +1000] "GET /apache_pb.gif HTTP/1.1" 200 2326 - - [18/May/2005:10:40:12 +1000] "GET /favicon.ico HTTP/1.1" 404 286
    That is a sample of the /access_log

    You should be able to work most of the data out (Or check the Apache docs to work it out), but the one to look for is the last number on each line. That is the amount of bytes served. From there you could knock up a script to find the logs for the websites and add together all the data served and there you have your bandwidth monitor.



    [EDIT: Fixed typo]

  3. #3
    Join Date
    Feb 2005
    Webmin is not integrating correctly for you?

  4. #4
    Join Date
    Sep 2004
    Webmin does work fine for me as far as my managing the server is concerned, but I'm trying to integrate some kind of email management with the custom customer site I'm creating, with the same look and feel and without having to enter a different username and password. I tried looking at the source code in webmin but my perl skills are virtually nil.

  5. #5
    Join Date
    Apr 2005
    Why not use some cURL to interface with webmin to manage the acounts for you. This is rather simple and should solve your problems.

  6. #6
    Join Date
    Apr 2003
    whilst you dont offer ftp access, what ive done in the past is integrate mail, ftp, web + a db backend. so in the db you've got a username, password, directory etc and a secodn table (this is simplistic but you get the idea) with the mail account details in, which also stores customerid. proftpd uses a db backend, and each customer has their own homedir with their own userid (so theres no lack of security). you can then let them add/remove mail addresses too for their userid, and just run a count to make sure they dont add too many..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts