Sample Header Ad - 728x90

http://localhost/~username - 403 forbidden error

1 vote
1 answer
494 views
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 ... Options Indexes FollowSymLinks Multiviews MultiviewsMatch Any AllowOverride All Require all granted SetHandler application/x-httpd-php ... # 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 RegisterUserSite customized-users /usr/local/etc/httpd/users/soren.conf: Options Indexes MultiViews FollowSymLinks ExecCGI AllowOverride None Require host localhost 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 AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require method GET POST OPTIONS 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
Asked by Søren Sjøstrøm (11 rep)
Aug 11, 2021, 04:36 PM
Last activity: Apr 24, 2025, 09:04 AM