I'm in the process of setting up my local ~/Sites folder, but if I access the page http://localhost/~soren I get a 403 error:
Forbidden
You don't have permission to access this resource.
I have read several tutorials etc. on the subject, but I still can not make it work.
Here are my access rights to my /Users, ~/ and ~/Sites folder:
drwxr-xr-x 5 root admin 160 Aug 9 03:14 /Users
drwxr-xr-x@ 64 soren staff 2048 Aug 11 05:19 /Users/soren/
drwxr-xr-x+ 9 soren staff 288 Aug 10 00:54 /Users/soren/Sites
Excerpt from my /usr/local/etc/httpd/httpd.conf file:
...
LoadModule authn_core_module lib/httpd/modules/mod_authn_core.so
LoadModule authz_host_module lib/httpd/modules/mod_authz_host.so
LoadModule userdir_module lib/httpd/modules/mod_userdir.so
...
# User/Group: The name (or #number) of the user/group to run httpd as.
User soren
Group staff
...
<Directory "/Users/soren/Sites">
Options Indexes FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Require all granted
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
</Directory>
...
# User home directories
Include /usr/local/etc/httpd/extra/httpd-userdir.conf
...
I have tried two different versions of httpd-userdir.conf but none of them work.
Version 1:
# Settings for user home directories
#
# Required module: mod_authz_core, mod_authz_host, mod_userdir
Include /usr/local/etc/httpd/users/*.conf
<IfModule bonjour_module>
RegisterUserSite customized-users
</IfModule>
/usr/local/etc/httpd/users/soren.conf:
<Directory "/Users/soren/Sites/">
Options Indexes MultiViews FollowSymLinks ExecCGI
AllowOverride None
Require host localhost
</Directory>
Access rights for soren.conf file:
-rw-r--r-- 1 root admin 145 Aug 11 07:29 /usr/local/etc/httpd/users/soren.conf
Version 2:
# Settings for user home directories
#
# Required module: mod_authz_core, mod_authz_host, mod_userdir
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir Sites
<Directory "/Users/soren/Sites">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
What else do I need to do to get this to work?
Edit: Just some more information that I forgot to write.
Here are my directory group rights:
ls -le /Users/:
0: group:everyone deny delete
ls -le /Users/soren/:
0: group:everyone deny delete