1

First, I looked on this page [Apache localhost 403 error with Yosemite because the person seems to have the same problem as me. I tried differents things but its doesn't work for me. When I write localhost in my url I receive a 403 Forbidden "You don't have permission to access / on this server". Sorry, I'm an beginner. I don't really know what kind of informations that you need to know to help me to fix that.

My directory /Users/schan/Sites/ My user.conf (schan.conf) is

<Directory "/Users/schan/Sites/">
  Options Indexes MultiViews
  AllowOverride All
  Require all granted
</Directory>

My httpd.conf (some informations tell me if you need more)

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Users/schan/Sites"
<Directory "/Users/schan/Sites">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

#
# Controls who can get stuff from this server.
#
Require all granted

Community
  • 1
  • 1
Schan
  • 43
  • 1
  • 2
  • 5

1 Answers1

2

If you write 'localhost' in your url, the following directory is called on yosemite: /Library/WebServer/Documents/ which is not the same as /Users/schan/Sites you would call /Users/schan/Sites using:

http://localhost/~schan

Getting a 403 on 'localhost' on my Yosemite happens, if i drop the read-permission from the Documents Folder, it should be 644 or, in Finder Info it would say

System    read and write
wheel     read only
everyone  read only

For setting up the local user, i found this link the most helpful and complete: http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/

kilian
  • 29
  • 4