Gentoo Archives: gentoo-admin

From: Robert Larson <robert@×××××××××.com>
To: gentoo-admin@l.g.o
Subject: Re: [gentoo-admin] shared gentoo linux hosting
Date: Thu, 13 Oct 2005 16:19:12
In Reply to: [gentoo-admin] shared gentoo linux hosting by Okulov Vitaliy

On Thursday 13 October 2005 10:24 am, Okulov Vitaliy wrote:
> Hi all. Somebody know how setup shared Gentoo linux hosting with Apache, > MySQL, PHP, JDK.
Virtual Hosting: This document covers installation and configuration: Installation docs: Here's some guides written about it: Or, here are the Wiki's if you need help:
> With ability to modify apache config & crontab for user using ssh access?
As far as allowing the users to modify their own vhost settings, you would put something like this in httpd.conf: Include /(path to vhost file)/(user's vhost file).conf You would have to have an entry for each user, so it might be better to have a vhost list file that you might include in apache2.conf: Include /etc/apache2/vhosts.list And in vhosts.list put: Include /(path to vhost file)/(user A's vhost file).conf Include /(path to vhost file)/(user B's vhost file).conf ... If you put the appropriate user's permissions on those specific files, they should be able to access them. Just make sure that apache has permission to read them as well. Something that you may want be concerned about though is that these people are modifying your web server's configuration. You may want to find a way to validate that these people aren't doing malicious things to their peices of the configurations. This might be accomplished by running a program that checks the files prior to restarting the server. Another concern is that each time a configuration change is applied you will need to restart apache, so "apachectl graceful" (or similar) would be ideal. Perhaps a more viable solution than the one above may be to write a cgi script that allows them to view their configuration, and modify it. Then upon hitting "Apply", it might check it for errors or malicious options, write it to a file, and restart the server. With crontab, they should be able to type "crontab -e" and it should allow them to modify it. If you are having trouble with that, then it probably depends on which cron implementation you have. Some implementations require that the user be in a certain group, and other's seem to just put strict permissions on /usr/bin/crontab. HTH, Robert -- gentoo-admin@g.o mailing list