We have recently upgraded our favicons so that they are accessed via the apache Alias function. They work just fine on several of our servers, but on my local development machine they return 403 errors.
The various servers are running Ubuntu; my local machine is a Mac. The stacks are pretty similar though. Before using the Alias function to locate the favicon file structure outside the docroot, we never had this problem.
This 403 issue on favicons is reported somewhat commonly. Unfortunately the standard solutions do not help. Here are some of the standard solutions:
- use Require all granted in the apache config.
- loosen permissions: we have set the perms to 777 for testing and on all the parent folders
The relevant portion of the config is as follows:
Alias /favicon /Users/jas/Websites/RepHunter/cfg/local/favicon/
Alias /favicon.ico /Users/jas/Websites/RepHunter/cfg/local/favicon/favicon.ico
<Directory "/Users/jas/Websites/RepHunter/favicon/>
Options None
Require all granted
AllowOverride None
</Directory>
The console tab of Dev Tools shows the following:
Again: we get no such errors on the other servers–only on my local.