Bankzilla Bankzilla -3 years ago 202
Apache Configuration Question

OSX localhost directory icons appearing as text [access_compat] [AH01797]

This issue seems to of come about after i've updated to Sierra. While inspecting the images it shows as

localhost/icons/text.gif
, I created a folder and assigned it
777
and still face the same issue.

The apache error log is getting spammed with the following every time a page is viewed that should be showing the icons.
/usr/share/httpd/icons/
is owned by root with
drwxr-xr-x
permissions.

[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

Answer Source

If you open the Apache configuration file using e.g:

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

then enter the following code (you can put it beside the other directory code):

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

Save the file out (ctrl-O), the close the file (ctrl-X) and restart apache using:

sudo apachectl restart

that should allow the icons to load.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download