Índice/Index

martes, 19 de junio de 2012

Run Apache with multiple users

You can run Apache as multiple users with this module: apache2-mpm-itk. This module as I understand it is for executing one of the Apache processes as the user established in VirtualHost. So we can have multiple VirtualHost with multiple users.

I have already used this module with Ubuntu and Apache2.

Ubuntu installation:

apt-get install apache2-mpm-itk

Then we just have to add this line inside a VirtualHost (or in all the VirtualHosts we want to run with a different user than the default for Apache):

<IfModule mpm_itk_module>
AssignUserId User Group
</IfModule>


And that's all. But obviously if we want the directory established to that VirtualHost to work, it must have the right permissions for that user and group whether to run scripts or to write a file.
Even it's possible to run Apache as root.

No hay comentarios:

Publicar un comentario