Apache 2 UserDir for only one VirtualHost

Posted by dentarg on Server Fault See other posts from Server Fault or by dentarg
Published on 2011-02-22T20:42:16Z Indexed on 2012/11/25 11:08 UTC
Read the original article Hit count: 280

Filed under:
|
|

Is it possible to enable the UserDir Directive for just one VirtualHost rather than have it on for all and then disable it (with "UserDir disable") for each VirtualHost you don't want it on?

I have tried by putting this inside a <VirtualHost> and comment out everything in the global config (/etc/apache2/conf.d/userdir.conf). No luck though.

<IfModule mod_userdir.c>
    UserDir public.www
    UserDir disabled root

    <Directory /home/*/public.www>
            AllowOverride FileInfo AuthConfig Limit Indexes
            Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
            <Limit GET POST OPTIONS>
                    Order allow,deny
                    Allow from all
            </Limit>
            <LimitExcept GET POST OPTIONS>
                    Order deny,allow
                    Deny from all
            </LimitExcept>
    </Directory>
</IfModule>

© Server Fault or respective owner

Related posts about apache2

Related posts about virtualhost