1
我有一個符號鏈接mysite
在我的/srv/http/
文件夾指向/home/some-user/somefolder
。 在我/etc/httpd/conf/httpd.conf
,根據這個網站多線程和其他論壇都圍繞互聯網,我設置如下:符號鏈接錯誤403與apache
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
然後,我改變權限777遞歸到我的符號鏈接的目標文件夾是這樣的:
chmod 777 -R /home/some-user/some-folder
但是,如果我打開我的網頁瀏覽器並輸入http://localhost/mysite/mypage.php
我得到以下錯誤:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.9 (Unix) PHP/5.5.14
我讀過馬NY的文章說這樣做,但我仍然可以得到它的工作...
Apache訪問和錯誤日志中的對應行是什麼? – arco444
好的,發現!我還需要chmod o + x/home/some-user(我的站點文件夾的父文件夾) – lviggiani