1

首先,我在這頁上看了[Apache localhost 403 error with Yosemite,因爲這個人似乎和我有同樣的問題。我嘗試了不同的東西,但它不適合我。當我在我的url中編寫本地主機時,我收到一個403 Forbidden "You don't have permission to access/on this server"。對不起,我是初學者。我不知道你需要知道什麼樣的信息來幫助我解決這個問題。優勝美地的本地主機錯誤(403禁止)

我的目錄/用戶/ schan /網站/ 我對user.conf(schan.conf)是

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

我的httpd.conf(一些信息,告訴我,如果你需要更多的)

# 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 

回答

2

如果你寫在你的URL「localhost」的,下面的目錄稱爲上約塞米蒂:/庫/ Web服務器/文件/ 這是不一樣的/用戶/ schan /網站 你會打電話/用戶/ schan /使用網站:

http://localhost/~schan 

獲取對我的優山美地「localhost」的一個403發生,如果我從Documents文件夾刪除讀取權限,它應該是644或在查找信息會說

System read and write 
wheel  read only 
everyone read only 

有關設置本地用戶,我發現這個環節最有幫助的,完整的:http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/