2017-03-06 50 views
0

在我更新到Sierra後,似乎出現此問題。在檢查顯示爲localhost/icons/text.gif的圖像時,我創建了一個文件夾並將其指定爲777,但仍面臨同樣的問題。OSX本地主機目錄圖標顯示爲文本[access_compat] [AH01797]

每次查看應該顯示圖標的頁面時,apache錯誤日誌都會收到以下垃圾信息。 /usr/share/httpd/icons/由根擁有drwxr-xr-x權限。

[access_compat:error] [pid 1763] [client ::1:49623] AH01797: client denied by server configuration: /usr/share/httpd/icons/unknown.gif, referer: http://localhost/testing/ 
[access_compat:error] [pid 1763] [client ::1:49623] AH01797: client denied by server configuration: /usr/share/httpd/icons/text.gif, referer: http://localhost/testing/ 
[access_compat:error] [pid 1763] [client ::1:49623] AH01797: client denied by server configuration: /usr/share/httpd/icons/folder.gif, referer: http://localhost/testing/ 
[access_compat:error] [pid 1763] [client ::1:49623] AH01797: client denied by server configuration: /usr/share/httpd/icons/compressed.gif, referer: http://localhost/testing/ 

Local folder icons

回答

1

如果您在使用開啓Apache的配置文件:

sudo nano /private/etc/apache2/httpd.conf 

然後輸入以下代碼(你可以把它的其他目錄代碼旁邊):

<Directory /usr/share/httpd/icons> 
     Allow from all 
</Directory> 

ctrl-O保存文件,關閉fil e爲ctrl-X和重啓Apache使用:

sudo apachectl restart 

應該允許圖標加載。