Necesita ayuda para configurar los directorios de usuarios de Apache

Necesita ayuda para configurar los directorios de usuarios de Apache

Me gustaría que Apache sirviera archivos "normales" de /srv/http/public, y archivos de usuario de /srv/http/[user], para que los directorios se vean así

/srv/http
  /public
    index.html - Accessible at localhost/index.html
  /austin
    index.html - Accessible at localhost/~austin/index.html

En este momento, tengo las siguientes configuraciones relevantes en los .confarchivos de Apache

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

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

UserDir /srv/http
UserDir disabled root

<Directory "/srv/http">
  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>

Y los siguientes permisos en /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

Usando esta configuración, localhost/index.htmlse muestra bien, pero localhost/~austin/index.html da una403 ¡Acceso prohibido!error, no importa lo que intente.

Editar:la entrada de error_log relevante: [error] [client ::1] client denied by server configuration: /srv/http/austin/index.html

¿Qué estoy haciendo mal?

Ah, y no creo que realmente importe, pero estoy usando Arch Linux y Apache 2.2.19.

Respuesta1

El problema era que la <Directory>directiva para los directorios de usuarios era demasiado restrictiva.

Reutilizar las mismas directivas del /srv/http/publicdirectorio permite que el mundo exterior vea los archivos de cualquier usuario:

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

información relacionada