OSX localhost目录图标显示为文本[access_compat] [AH01797]

问题描述 投票:0回答:1

这个问题似乎是在我更新到Sierra之后出现的。在检查它显示为localhost/icons/text.gif的图像时,我创建了一个文件夹并将其分配给777并仍然面临同样的问题。

每次查看应显示图标的页面时,apache错误日志都会被以下内容发送垃圾邮件。 /usr/share/httpd/icons/由root拥有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

macos apache permissions
1个回答
1
投票

如果使用以下命令打开Apache配置文件:

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

然后输入以下代码(您可以将其放在其他目录代码旁边):

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

使用ctrl-O保存文件,然后使用ctrl-X关闭文件并使用以下命令重新启动apache:

sudo apachectl restart

应该允许图标加载。

© www.soinside.com 2019 - 2024. All rights reserved.