Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have Apache serve "normal" files out of /srv/http/public, and user files out of /srv/http/[user], so the directories might look like

    index.html - Accessible at localhost/index.html
    index.html - Accessible at localhost/~austin/index.html

Right now, I have the following relevant configurations in the Apache .conf files

User http
Group http
DocumentRoot "/srv/http/public"

<Directory "/srv/http/public">
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all

UserDir /srv/http
UserDir disabled root

<Directory "/srv/http">
  AllowOverride FileInfo AuthConfig Limit Indexes
  Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Order allow,deny
    Allow from all
  <LimitExcept GET POST OPTIONS>
    Order deny,allow
    Deny from all

And the following permissions in /srv/http:

drwxr-xr-x  root    http   /srv/http
drwxr-xr-x  http    http   /srv/http/public
-rwxr-xr-x  http    http   /srv/http/public/index.html
drwxr-xr-x  austin  http   /srv/http/austin
-rwxr-xr-x  austin  http   /srv/http/austin/index.html

Using this setup, localhost/index.html displays fine, but localhost/~austin/index.html gives a 403 Access forbidden! error, no matter what I try.

Edit: the relevant error_log entry: [error] [client ::1] client denied by server configuration: /srv/http/austin/index.html

What am I doing wrong?

Oh, and I don't think it really matters, but I'm using Arch Linux, and Apache 2.2.19

share|improve this question
Your logs say...? – Ignacio Vazquez-Abrams Jul 26 '11 at 1:08
I updated the question with the only message given by the log file (except for the request for the favicon.ico file) – Austin Hyde Jul 26 '11 at 1:46

The problem was that the <Directory> directive for the user directories was too restrictive.

Re-using the same directives from the /srv/http/public directory allows the outside world to see any user files:

<Directory "/srv/http">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
share|improve this answer

Your Answer


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.