2017-03-06 70 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 

应该允许图标加载。