[ckan-dev] Archiver archive_dir and cache_url_root
McDonaldR
McDonaldR at angus.gov.uk
Wed Aug 10 14:09:10 UTC 2016
Hi List,
I've create the following directory (owned by www-data) for the archiver plugin:
/usr/share/nginx/html/resource_cache
This has sub-directories like
* 26/someresourceid/kml
* 2f/someotherresourceid/ows
* etc
I have set the following in my production.ini
* ckanext-archiver.archive_dir = /usr/share/nginx/html/resource_cache
* ckanext-archiver.cache_root_url = http://opendata.angus.gov.uk/resource_cache
My nginx config file looks like this:
# Archived Files
location /resource_cache {
root /usr/share/nginx/html/resource_cache;
}
The download URL presented in the archive section of the resources page looks like this:
http://opendata.angus.gov.uk/98/987c7253-0da3-4dba-8bb1-f871a2de31ee/kml but I get a 404 not found from CKAN
If I amend the URL to include "resource_cache"
http://opendata.angus.gov.uk/resource_cache/98/987c7253-0da3-4dba-8bb1-f871a2de31ee/kml I also get a 404 not found but from Nginx
Archiver is working correctly as the cache resources are created in the defined directory and qa.update_package sniffs out the correct file format in the correct directory but the link presented by the frontend resource template is not correct. Any suggestions gratefully received.
Thanks
Ross
Ross McDonald | GIS Data Coordinator | Resources Department, IT Division | Angus Council, Angus House, Orchardbank Business Park, Forfar, DD8 1AT
T: 01307 476419 | F: 01307 476401 | E: mcdonaldr at angus.gov.uk<mailto:mcdonaldr at angus.gov.uk>
This message is strictly confidential. If you have received this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does not represent the views of Angus Council. Emails may be monitored for security and network management reasons. Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160810/cd623be6/attachment-0002.html>
More information about the ckan-dev
mailing list