Hi,
If you want to run apache virtual host with its own user and group privileges. This module will make apache to access web contents with webcontent’s owner privileges. To do that you need mpm-itk module. If you have installed httpd with rpm you can install mpm-itk by steps from this.
To recompile apache with mpm-itk you need to use the option “–with-mpm=itk”
wget http://mirrors.sonic.net/apache//httpd/httpd-2.2.21.tar.gz tar -xvf httpd-2.2.21.tar.gz cd httpd-2.2.21 ./configure --prefix=/usr/local/apache --enable-so --enable-rewrite\ --with-mpm=itk make make install
That’s it you have compiled apache with itk module, now you need to add the virtual host entry for a domain as below.
ServerName domainname.com DocumentRoot /path/to/web/root AssignUserId username groupname
Then restart apache.
/etc/init.d/httpd restart
You can check by using the following command.
ps aux | grep username
It should return as below
username 32439 7.1 32880 S 16:28 0:00 httpd -k restart username 32441 3.2 22788 S 16:28 0:00 httpd -k restart username 32442 7.1 33024 S 16:28 0:00 httpd -k restart username 32443 7.1 33024 S 16:28 0:00 httpd -k restart username 32444 3.2 22788 S 16:28 0:00 httpd -k restart username 32446 3.2 22788 S 16:28 0:00 httpd -k restart
Thank you for viewing helpinlinux.com