Reputation: 1034
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:
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.
EDIT 1:
Taking the suggestion from Gordon Davisson, we moved the favicon files completely outside /Users. That still did not work. As a next step, we put the favicon files back into /favicon in the docroot, the way you are supposed to do it, without using the alias. That removed the 403 errors.
Interim conclusion:
My suspicion is that there is something in the configuration that is wrong.
Another point that I should have put in the original question: the favicon actually works as seen in the browser tab for the page. It is just that we get the 403 forbidden errors in the network tab of Dev Tools for each of the six or so files in the favicon folder.
Upvotes: 0
Views: 370