[mpm-itk] different AssignUserID in <Location> and <Directory>

Andre Hoepner (i.based: Systemhaus GmbH & Co. KG) a.hoepner at ibased.de
Wed Mar 13 18:30:28 CET 2013

Hello group members,

im playing around with apache configuration in which we want to serve 
different locations running each with other username/group.
We use virtual hosts for different users an this works fine, but in this 
case we only have one virtual host with different aliases.


URL:	http://www.example.com/USER1
DIR:	/home/USER1/htdocs

URL:	http://www.example.com/USER2
DIR:	/home/USER2/htdocs

We have tried mod_userdir but all requests inside momd_userdir runs with 
apache:apache and userdirs should have no read access to other users 
home. So we need different perms to read documents from different homes.

I've found some posts from this list, which told that's possible to
use AssignUserID inside </Location> and </Directory>...


But this does not work, or i run into an error. Inside a virtual Host
i tried to assign aliases which Location and Directory, but the tested
scripts runs as standard apache user not the assigned user / group.

This is my config:


<VirtualHost *:80>
    ServerName example.com
    # standard document root for access to /
    DocumentRoot "/var/www/htdocs"

    <Directory "/var/www/htdocs">
	Options Indexes FollowSymLinks
	AllowOverride AuthConfig
	Order allow,deny
         Allow from all

# first user with different perms
Alias /USER1 /home/USER1/htdocs

         <Location /USER1>
                 AssignUserID    USER1 USER1
                 DirectoryIndex index.html index.php

         <Directory /home/USER1/htdocs>
                 AssignUserID    USER1 USER1
                 Order allow,deny
                 Allow from all

# second user with different perms
Alias /USER2 /home/USER2/htdocs

         <Location /USER2>
                 AssignUserID    USER2 USER2
                 DirectoryIndex index.html index.php

         <Directory /home/USER2/htdocs>
                 AssignUserID    USER2 USER2
                 Order allow,deny
                 Allow from all



I hope you understand what i tried to describe. Any ideas? I want to get 
this thing working. :-) Thanks a lot for your time to help me.



Andre, a.hoepner at ibased.de

More information about the mpm-itk mailing list