WebFaction
Community site: login faq

I have read all of the answers related with webfaction + apache + django + favicons but none of them fulfils my needs. My dir structure is this (as usual):

webapps/
  |_____django_app/
             |________apache2/
             |________favicon.ico
             |________favicon/
             |________djagno_project/

As you can see I have both a favicon.ico for most browsers to search and a favicon folder which includes different favicon sizes (.png) for other browsers and operating systems (for android, iOS etc.) I followed ryans approach for my favicon.ico and it works perfectly. So I guessed that the following code (in order to serve the .pngs inside the favicon dir) inside my httpd.conf would work, BUT it didn't.

<Location "/favicon/*"> SetHandler None </Location>

alias /favicon/* /home/username/webapps/django_app/favicon/

Inside my html I have declared all of my *.png as <link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-touch-icon-60x60.png"$gt; etc.

How do I serve all these *.pngs?

[EDIT] Forgot to mention that I can see www.mywebsite.com/favicon.ico but not (404 is thrown) www.mywebsite.com/favicon/apple-touch-icon-60x60.png

asked 29 Apr '16, 07:08

nik
130111
accept rate: 16%

edited 29 Apr '16, 07:13


Try dropping the wildcard from your alias, eg:

Alias /favicon/ /home/username/webapps/django_app/favicon/

Be sure to restart Apache after making that change.

Hope that helps!

permanent link

answered 29 Apr '16, 16:23

seanf
12.2k31836
accept rate: 37%

1

You rock man! Thank you. No more 404s

(29 Apr '16, 17:55) nik

You're very welcome!

(29 Apr '16, 18:01) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×905
×224
×6

question asked: 29 Apr '16, 07:08

question was seen: 1,276 times

last updated: 29 Apr '16, 18:01

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM