I want to learn about the ‘mechanics’ of setting up domain space and mailboxes on a linux server as well as setting up each clients ‘tools’ eg webaliser,mod_perl, php etc, just as would normally be done in Plesk, for example. (edit - Those packages are already on the server).
I have searched without success for a tutorial so I would be very grateful if anyone could give me a link or to respond to my questions below so that I can remove a load of duplication between running my own db and that of Plesk.
when I create a new domain folder for www.example.com, is that as simple as mkdir? does the detail of that dir need to be stored anywhere on the server or is it enough just to create it?
when setting up a mailbox, where do I save it? is it just a normal directory located in a specific server directory?
Where do I set the features that a domain has access to? eg mod perl, php, fast CGI etc.
If all this data is to be stored in a MySQL-type database, where should I set the connection params on the server so it knows which db to connect to?
Hi, you’re using Linux so I’m assuming apache here.
when I create a new domain folder for www.example.com, is that as simple as mkdir? does the detail of that dir need to be stored anywhere on the server or is it enough just to create it?
Technically, yes. But you do have to configure the webserver to understand that that folder is associated with a host. You do this by adding a host configuration, probably for a virtualhost. Here you tell the webserver which domainname is associated with which settings and data.
when setting up a mailbox, where do I save it? is it just a normal directory located in a specific server directory?
Usually maildata is saved in a user’s home directory (/home/joe/Maildir in case of IMAP, for instance) but this can be configured in your particular mailserver configuration file, like /etc/postfix (mail) /etc/dovecot (imap) it really depends.
Where do I set the features that a domain has access to? eg mod perl, php, fast CGI etc.
This is done in the (virtual)host configuration, as per point one.
If all this data is to be stored in a MySQL-type database, where should I set the connection params on the server so it knows which db to connect to?
Usually the webapplication that needs to access the data has to know about this, so you’d set PHP (for instance) up to talk to the MySQL DB.
I hope I’m clear enough - the apache/lighttpd/etc docs are a great resource. Feel free to ask more if you’re unsure about things.
OK, I have read up some ore on virtual hosts. What (I trhink) I am trying to do is to tell the httpd.conf file wghere to get the data it needs from.
Instead of adding this section <below), to the bottom of the httpd.conf file for each domain, I want to store whatever is necessary in a mysql db and have the httpd.conf file read it in when it needs to.
so I want to ‘include’ (if that is the correct term), instead of
I can’t seem to find anywhere that shows me how to do it but I expect it can be done.
I can’t use control panel or plesk because this is for an environment where there are multiple servers connected through a RAID array, where some webservers are active slaves so that they take over if/when a live one fails.
Tricky. If you want to store such config settings in a DB and create vhosts on the fly, you want to have control over your webserver from inside a webapplication, probably. Such things are possible with mod_perl. Perhaps also with mod_php, I am not sure.