macはapacheを持ってdocumentRootを修正してから報告する権限がありません

2190 ワード

mac apacheディレクトリ、/private/etc/apache 2
apache 2/httpdを修正する.confファイル
以下のように修正すればよい
  • ユーザ名
  • Directory
  • #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User qifeng   #    
    Group _www
    
    
    
    
        # AllowOverride none
        AllowOverride all
        Options All
        allow from all
        # Require all denied
    
    
    #
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    #
    
    #
    # 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 "/Library/WebServer/Documents"
    # 
    DocumentRoot "/Users/qifeng/Desktop/qiphon/php"
    
        #
        # 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
        # Options Indexes 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 None
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Require all granted