I've just upgraded the server from Ubuntu Hardy 8.04 LTS to Lucid 10.04 LTS.
As part of that process the apache web-server was updated and lost the custom-built
suexec which caused the apache2 server to fail to start.
On investigation I found that Ubuntu now carries a custom suexec package that can be configured via a configuration file rather than re-compiling the
suexec binary.
Install the custom package:
Code:
sudo apt-get install apache2-suexec-custom
The man page says:
Quote:
This version of suexec reads a config file on every execution ... If suexec is called by a user with name ’username’, it will look into /etc/apache2/suexec/username for configuration. If the file does not
exist, suexec will abort. By creating several config files, you can allow several different apache run users to use suexec.
The configuration file requirements are:
Quote:
The first line in the file is used as the document root (/var/www in the standard suexec) and the second line in the file is used as the suffix that is appended to users’ home directories (public_html in standard suexec).
If any of the lines is commented out (with #), suexec will refuse the corresponding type of request. It is recommended to comment out the userdir suffix if you don’t need it.
There is an example file at
/etc/apache2/suexec/www-data:
Code:
/var/www
public_html/cgi-bin
# The first two lines contain the suexec document root and the suexec userdir
# suffix. Both features can be disabled separately by prepending a # character.
# This config file is only used by the apache2-suexec-custom package.
In my scenario, using VirtualMin, and without wanting to change the existing configuration for all the virtual servers, I added a custom suexec configuration file for each virtual server user account:
Code:
/home
public_html
The man-page Security recommendation says:
Quote:
Do not set the document root to a path that includes users’ home directories (like /home or /var)...
but due to the way the server is configured by VirtualMin I am happy to allow this without being concerned too much. I'll investigate this further when I'm sure the upgraded server services are all working as expected.