Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The problem is when I have a docroot pointing to some user's public_html/*. Say there is a virtualhost with Docroot /home/user/public_html/www - there .htaccess works. Yet when I go to example.com/~user/www the .htaccess does not work, Apache does not even read it ( I tested by creating garbled content in it).

My configuration for userdir is:

<IfModule mod_userdir.c>
    UserDir public_html
    UserDir disabled root

    <Directory /home/*/public_html>
            Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec
            AllowOverride All
            <Limit GET POST OPTIONS>
                    Order allow,deny
                    Allow from all
            </Limit>
            <LimitExcept GET POST OPTIONS>
                    Order deny,allow
                    Deny from all
            </LimitExcept>
    </Directory>
</IfModule>

For vhosts:

<VirtualHost *:80>
  ServerName example.com
  DocumentRoot /home/user/public_html/www
</VirtualHost>

.htaccess in in /home/user/public_html/www

share|improve this question

1 Answer 1

When I had problems kinda like this, I used the Location directive bracket in addition to the Directory directive backet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.