[PATCH] Updates Apache config file to properly handle web fonts

Matt Wagner matt.wagner at redhat.com
Mon Mar 26 18:49:03 UTC 2012


---
 recipes/aeolus/files/aggregator-httpd-ssl.conf |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/recipes/aeolus/files/aggregator-httpd-ssl.conf b/recipes/aeolus/files/aggregator-httpd-ssl.conf
index 47f5aa0..2f565b2 100644
--- a/recipes/aeolus/files/aggregator-httpd-ssl.conf
+++ b/recipes/aeolus/files/aggregator-httpd-ssl.conf
@@ -16,11 +16,13 @@ NameVirtualHost *:443
   Timeout 5400
   ProxyTimeout 5400
 
+AddType application/x-woff .woff
+
 Alias /conductor/stylesheets "/usr/share/aeolus-conductor/public/stylesheets"
 Alias /conductor/graphics "/usr/share/aeolus-conductor/public/images"
 Alias /conductor/errors "/usr/share/aeolus-conductor/public/errors"
 Alias /conductor/javascripts "/usr/share/aeolus-conductor/public/javascripts"
-Alias /fonts "/usr/share/aeolus-conductor/public/fonts"
+Alias /conductor/fonts "/usr/share/aeolus-conductor/public/fonts"
 
 RewriteRule ^/conductor/images/(.*).(png|jpg|gif|svg)$ /conductor/graphics/$1.$2 [R]
 
@@ -29,17 +31,24 @@ ExpiresByType text/css "access plus 1 year"
 ExpiresByType text/javascript "access plus 1 year"
 ExpiresByType application/javascript "access plus 1 year"
 ExpiresByType image/png "access plus 1 year"
+# Web fonts (.eot, .ttf, .svg, .woff, respectively):
+ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
+ExpiresByType application/x-font-ttf "access plus 1 year"
+ExpiresByType image/svg+xml "access plus 1 year"
+ExpiresByType application/x-woff "access plus 1 year"
 
 ProxyPass /conductor/graphics !
 ProxyPass /conductor/stylesheets !
 ProxyPass /conductor/errors !
 ProxyPass /conductor/javascripts !
+ProxyPass /conductor/fonts !
 ProxyPass /conductor http://localhost:3000/conductor
 ProxyPassReverse /conductor http://localhost:3000/conductor
 ProxyPassReverse /conductor/graphics !
 ProxyPassReverse /conductor/stylesheets !
 ProxyPassReverse /conductor/errors !
 ProxyPassReverse /conductor/javascripts !
+ProxyPassReverse /conductor/fonts !
 
 </VirtualHost>
 
-- 
1.7.7.6




More information about the aeolus-devel mailing list