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?
asked Nov 12 '10 at 14:44
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!
answered Nov 12 '10 at 20:35
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.
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!