Web Hosting Talk







View Full Version : Im just curious...


Billy
08-21-2001, 10:00 PM
Okay,say you have a server,or are writing the control panel for the server,it runs a UNIX OS.There is no GUI.Is there like a configuration file for everything,like for example creating a new POP3 account,would you just add a line to a configuration file,or is it something far more compilicated?At first,i thought creating a subdomain would be hard,but then when i saw how to do it that it only took about 5 lines of directives in httpd.conf i realized it was easier than i thought.So basically,how do the control panels do what they do,what works behind them,and is it possible to write a CP in a scripting language like Perl of PHP?

Thanks
Billy

bert
08-22-2001, 10:35 PM
Hi Billy,

Yes absolutely. You can write a script (if you know coding of course) that can do everything for you.

Every service on a Linux server needs to be setup accordingly. Just like you setup a subdomain by adding a virtualhost entry in httpd.conf, you can add other services. For example, to create a full-featured domain account, you would first have to create a user account, this will add an environment for the user (their rights, their home directory, etc.) then you would have to make the proper entries in several different files such as:

/etc/proftpd.conf
/etc/passwd
/etc/shadow
/etc/localdomains
/etc/domainalias
/etc/userdomains
/etc/httpd/conf/httpd.conf

Create a DNS file such as domain.com.db, put the file in /var/named/ , create an entry in /etc/named.conf, etc, etc, etc...
(There are more files, I just can't recall off the top of my head)

So, if you know how to code, you can write a script that can do all that and that can modify some of these files like to change the password for the user, create email accounts and other features. It is not an easy task, but again, if you know how to code and have time to spare it might be worth a try.

Hope this helps a little :)

Billy
08-23-2001, 09:16 AM
Sure,i know tons in Perl,is there a good place to learn like what files need to be modified and stuff to add new things,like a POP3,or stuff like that.This might be a good script,packed with a file manager.

bert
08-23-2001, 10:48 AM
It depends on the OS that you will be running, but you can buy pretty much any book for Linux and it will tell you everything.

There is a book called "Red Hat Linux Bible" by Christopher Negus, that book tells you everything you need to know about the OS. It also shows you how to configure the most popular software such as Apache, Sendmail, etc.