Our Apache config was invalid for /fonts, though the problem wasn't apparent because the current UI doesn't use them. As we work towards a unified UI, we're using a web font and it wasn't showing in RPM builds due to the invalid reference. This fixes the Alias, tells Apache to not proxy those requests to Rails, and also sets Cache-Control headers on the fonts. I had to add a MIME type for *.woff manually to appease Apache.
This is not associated with a BZ. There is no need to carry this in the existing product release; it's only useful going forward when we add web fonts.
--- 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>
On 26/03/12 14:49 -0400, Matt Wagner wrote:
recipes/aeolus/files/aggregator-httpd-ssl.conf | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
Maybe there was another patch I didnt see, but what about the file in conductor? conf/aeolus-conductor-httpd.conf
Oh, and hmm, looking at configure src, there is a simiar file to what you changed, but minus ssl. Seems to me like at least one (if not more) of these 3 shoudl go away, and all remaining should be fixed. And those ancient names should be fixed, I can believe there are any refs to aggregator anymore, insane! (That doesnt have to be in this atchset, but I suspect if it isn't we'll forget for another couple years...) Just did quick search, and these look like the offending references:
../aeolus-configure/pkg/aeolus-configure-2.6.0/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
../aeolus-configure/pkg/aeolus-configure-2.6.0/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
../aeolus-configure/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
../aeolus-configure/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
-j
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
On Tue, Mar 27, 2012 at 02:34:46PM -0400, Jason Guiditta wrote:
On 26/03/12 14:49 -0400, Matt Wagner wrote:
recipes/aeolus/files/aggregator-httpd-ssl.conf | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
Maybe there was another patch I didnt see, but what about the file in conductor? conf/aeolus-conductor-httpd.conf
Oops, I somehow managed to not reply to this previously.
As best as I can tell, the file in Conductor is not used anywhere. It should be removed.
Oh, and hmm, looking at configure src, there is a simiar file to what you changed, but minus ssl. Seems to me like at least one (if not more) of these 3 shoudl go away, and all remaining should be fixed. And those ancient names should be fixed, I can believe there are any refs to aggregator anymore, insane! (That doesnt have to be in this atchset, but I suspect if it isn't we'll forget for another couple years...) Just did quick search, and these look like the offending references:
../aeolus-configure/pkg/aeolus-configure-2.6.0/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
../aeolus-configure/pkg/aeolus-configure-2.6.0/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
../aeolus-configure/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
../aeolus-configure/recipes/aeolus/manifests/conductor.pp: apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
As best as I can tell, this is the only file that needs updating. Conductor is basically HTTPS-only; the HTTP interface merely redirects to the HTTP one. It would probably be better to clean all of this up, but I would argue it should take place in a separate commit.
I had thought this was fixed, but it looks like it's not. :-\
-- Matt
is this why we had the enormous long flash of unstyled content (fouc) for all things styled with out font ?
On 27/03/2012, at 4:49 AM, Matt Wagner wrote:
Our Apache config was invalid for /fonts, though the problem wasn't apparent because the current UI doesn't use them. As we work towards a unified UI, we're using a web font and it wasn't showing in RPM builds due to the invalid reference. This fixes the Alias, tells Apache to not proxy those requests to Rails, and also sets Cache-Control headers on the fonts. I had to add a MIME type for *.woff manually to appease Apache.
This is not associated with a BZ. There is no need to carry this in the existing product release; it's only useful going forward when we add web fonts.
aeolus-devel@lists.fedorahosted.org