|
I have configured a Django app in the server. I’m trying to configure this apache module, but I couldn’t yet. The page is re-written by mod_pagespeed, but the static media isn’t working. I’m getting 404 for all files. I don’t know what to do. This is the name for one file: /static/js/jm.09b1de650ada3b7af523c64d11fa6fbe.jquery,omin,l.js The original file is: /static/js/jquery.min.js What can I do? Thanks |
|
I am having a similar problem. I think the reason is that your media files at /static/* are being served by Webfaction's main Apache static/php/cgi instance. (this is the typical Webfaction Django setup) You should be able to fix the problem by:
You can then add the following to your .htaccess file in your static media directory which serves you Static files for django if you want to get some benefits out of mod_pagespeed over your static files (I'm not sure if this does anything for the static files though).
Hope that helps, It might not be the correct solution but it worked for me! G 1
You may need to disable caching, compression and combination of js and css files too. Just been recommended to turn mod_pagespeed off due to a bug: http://code.google.com/p/modpagespeed/issues/detail?id=10 I have to disable these filters: ModPagespeedDisableFilters rewrite_images,extend_cache,combine_css I want to keep enabled those filters, but I don't know how to do it yet :( Can't the main Apache serves the images, css and js files re-written by mod_pagespeed? I configured mod_pagespeed following this guide http://blog.webfaction.com/2010/11/speed-up-your-pages-with-mod_pagespeed/ mod_pagespeed is still a fairly new module. While Google continues to work on the module, and work on removing bugs, we recommend serving static media as shown here: http://docs.webfaction.com/software/django/getting-started.html#serving-static-media
showing 5 of 6
show all
|
|
I have the same problem, the css and js are compressed (i can find it in mod_pagespeed/cache/) but the URI of the compressed files is wrong, it point to the original site media dir. EDIT: my static files are served by NGINX |
|
One possible solution is to sym-link the files in your cache directory (or even set your page_speed cache directory) to your media directory which is served by NGINX. The only problem is that this will not work for files in any subfolders in the media directory.
E.g.
Will work for: (If you are game enough, you could try 'hack' the filters in mod_pagespeed source to rewrite the compressed image and url source paths to another path (e.g. all to go to '/media/cached/' and compile it into a .so module yourself.) ** come to think of it, I wouldn't recommend doing this unless you really know what you are doing! |
How are you serving your static media?