Hey all, I'm a Plesk user, but have simply had enough of Plesk's intrusiveness into my ability to configure things in an OS native way. I'm also tired of breaking Plesk when I do things like 'yum update' (I run CentOS).
I've set up a little sandbox server to get used to Virtualmin before I move my live sites into a Virtualmin setup, and I'm really liking it. I have a few questions.
First, one small thing that I liked about Plesk was that it puts virtual host configuration settings in user-specific files, eg /var/www/vhosts/domain.com/conf/httpd.include or vhost.conf. I've tinkered around enough with Virtualmin to realize that I can create a skeleton template in /etc/skel. What I'd like to know is if I can make a file in /etc/skel/conf, name it something like httpd.include, and have it substitute lines in the file per the virtual host being setup. I'm not entirely sure, but is this what it's talking about when it asks 'Substitute variables in contents?' when I'm setting up a default virtual server template? Or does 'contents' mean that it will just make substitutions in directory/file names?
If it can make substitutions in the actual files, then can I have it only write one line into /etc/httpd/conf/httpd.conf like 'Include /home/${HOME}/conf/httpd.include' instead of defining the whole virtual server in httpd.conf? The reason I'm asking all this is because I'd rather not have httpd.conf get so long, and I'd like to be able to ssh in as an ordinary user with the ability to edit the include file. My development box, which has no administrative hosting software works in this somewhat fragmented way, and I prefer it.
My other question is, I always keep my web servers separate from my email servers. Will Virtualmin get angry if I remove all the mail handling packages?
Even if I can't get these little quirks sorted out to full satisfaction, I'm very pleased with this system. Kudos to the devs.
Howdy,
First, one small thing that I liked about Plesk was that it puts virtual host configuration settings in user-specific files
Virtualmin uses the default of your Linux distribution there... in the case of CentOS, all the VirtualHost settings go into /etc/httpd/conf/httpd.conf, as you've seen.
However, Debian and Ubuntu handle that differently -- they're configured to use the individual files.
Apache on Debian and Ubuntu systems is configured out of the box to do that.
You could modify Apache to act like that if you want... though sometimes it's simpler to keep distro defaults such as that the way they are :-)
If you're really set on changing that, you'd need to add some sort of include line into your httpd.conf file where your VirtualHost files would be located, along the lines of "Include /etc/apache2/sites/".
Then, if you go into Webmin -> Servers -> Apache -> Module Config, you can set "File or directory to add virtual servers to" to the directory you want to use that will store all your VirtualHost files.
My other question is, I always keep my web servers separate from my email servers. Will Virtualmin get angry if I remove all the mail handling packages?
Well, that's unfortunately kind of tricky. You can of course not have Virtualmin manage your email, and that's no problem... but if email isn't on the same server as your web stuff, Virtualmin wouldn't be able to manage it for you.
You can do things like put SpamAssassin and ClamAV on another server.
You could also use another server as an email relay host... keeping all of your mail users on the main server, but having outgoing email route through another server.
However, to have all email functionality on another server -- you can do that, it just means that you'd need a tool other than Virtualmin to manage it (or you'd need a separate Virtualmin instance on your mail server).
I hope that helps!
-Eric
It does help a little. About the mail situation, my registrar provides all the 1GB mailboxes I need for each domain. So I just use their mail servers, and set up my clients with gmail accounts connected to their domain accounts. I just want to know if Virtualmin is going to get funky if there are no mail packages installed on my web server.
About the virtual hosting, making a template file (/etc/skel/conf/httpd.include) with substitutions in it works great. My question now is how can I get Virtualmin to write 'Include /home/${HOME}/conf/httpd.include' at the end of /etc/httpd/conf/httpd.conf when I create a new virtual server?
Howdy,
For the templating, using something like "Include /etc/apache2/sites/.conf" in Apache makes it so that you don't need to mention each individual VirtualHost .conf file... pointing it at Include /etc/apache2/sites/.conf will load every file in that directory that ends in .conf.
For your mail accounts -- that sounds perfect. You'd want to turn off the "Mail for Domain" feature, and you could setup the MX records for your domain to point to your ISP.
I would recommend keeping the mail packages installed, as you want email to be able to go out... the thing to do would be to just disable the Mail for Domain feature, which tells Virtualmin that it won't be accepting email. However, that still allows your websites to send emails externally, cron jobs can send email, and the like.
-Eric
I hadn't thought of something like this. Actually, the line needs to have *.conf in it, but yeah that worked. Now I can put different vhost conf files every time I create a new virtual server. I still wish I could put the conf files in each virtual servers home directory, but this will pretty much do what I want.