Run Apache virtual host with its own user and group ID’s

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. You can download mpm-itk module from



Install itk module in the server

#rpm -ivh httpd-itk-2.2.19-1.w5.x86_64.rpm

After installing stop apache service

#/etc/init.d/httpd stop

Then add the following line in /etc/sysconfig/httpd


Then edit httpd.conf file and make changes to the domain’s Virtual host
entry as below

    DocumentRoot /path/to/web/root

    AssignUserId username groupname

After adding start apache services

#/etc/init.d/httpd start

then change ownership of the web path by following command

#chown username:groupname /path/to/webroot
#chmod 710 /path/to/webroot
ls -al /path/to/webroot
drwx--x--- /path/to/webroot

That is it. Now apache will access your website contents with your own username and group name.



Thank you for viewing


Leave a Reply

Protected by WP Anti Spam