Commit graph

25 commits

Author SHA1 Message Date
Alexis Métaireau
b3d6d6da08 [docs] Update the documentation 2023-11-28 15:54:11 +01:00
Yohan Boniface
fc64551c82 Add in documentation example of filtering headers in ajax proxy conf 2023-11-23 17:03:16 +01:00
John Martinez
7134269218
Update docs/ubuntu.md
Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
2023-09-19 14:58:21 -04:00
John Martinez
89cfa7d93d Ran through the 'Ubuntu from Scratch' procedure using a fresh Ubuntu 22.04.3 LTS VM and took notes on what worked and what didn't.
Here's a summary of the changes and why

* added 'apt update' before the install -- only _needed_ on a completely fresh VM, but never hurts

* added an install of the virtualenv package, because it is used later but: do you still need it AND python3-venv? I'm assuming it was done that way for a reason.

* changed indentation on the mkdir so it will format correctly

* added `-D ~postgres` to the commands executed as postgres user because the postgres user does not, by default, have permission to read into real user's home directories (at least in 22.04) and so the commands would error out

* change `source <activate>` to `. activate` because the line `sudo -u umap -i` launches `sh`, not `bash`, and `sh` does not recognize the source command. `.` works in either.

* remove the instructions to change STATIC_ROOT and MEDIA_ROOT because they are already defaulted to those values in the current version sample of local.py

* added a notice to change the SECREY_KEY and ADMINS list just because it seemed like a good idea.

Side note: I have not seen any docs anywhere that explains exactly what the secret Key does, or where it is used. It's used a magic variable in the config file.. ?

I am not currently messing with nginx or wsgi, so I can't comment on those parts.
2023-09-19 18:32:13 +00:00
Yohan Boniface
597b3bb10f Change proxy_cache_key value in documentation
Now that the case is done in the internal redirect part, there is
no more args, the URL is on the path
2023-08-29 10:37:12 +02:00
Yohan Boniface
5156da6107 doc: add resolver where needed in nginx configuration 2023-08-28 18:10:22 +02:00
Yohan Boniface
2904bcc617 More documentation about "ajax-proxy" 2023-08-28 16:36:50 +02:00
Yohan Boniface
7210b1ddb9 Remove useless resolver from nginx config in doc 2023-08-24 17:48:41 +02:00
Yohan Boniface
c4bdb04795 Use X-Accel-Redirect for serving ajax-proxy request
uMap allows to use remote URL as data sources, but those URLs
are not always CORS open, so this is why there is this "ajax-proxy"
feature, where the URL is passed to the backend.

Additionally, there is a caching feature, which duration is configurable
through frontend settings. Valid values are: disabled, 5 min, 1 hour,
1 day.

Initially, I wanted this to be totally handled by Nginx, but I never
found a wayt to set the proxy_cache_valid value from a query string.

Since then, at least in OSM France servers, the ajax-proxy is still
handled by a Django view, which then opens the remote URL and transfert
the data. This is not optimal. And I suppose this is what is causing
hicups on the OSM France servers lately.

This PR provides a mix option, where python deals with validating the
URL and parsing the TTL parameter, and then it passes the hand to
nginx which will serve the remote content.

So, roughtly:

- the client calls /ajax-proxy/?url=xxx&ttl=300
- python will validate the URL (not internal calls…)
- if UMAP_SENDFILE_HEADER is set, then the python returns an empty
  response with the path /proxy/http://url plus it will set the
  cache ttl through the header X-Accel-Expires
- this /proxy/ location is then handled by nginx
2023-08-24 13:41:34 +02:00
remco
c0063d2fa2 Fix permisson problem, use suggestion from #407 2023-06-14 21:47:37 +02:00
Yohan Boniface
89e0900148 Review ubuntu packages after fresh install 2023-05-05 15:57:32 +02:00
Yohan Boniface
894facc7e3 Document x-accel-redirect and ajax-proxy cache configuration 2023-02-27 12:32:35 +01:00
Binnette
e2ca1ecd63 Normalize keyboard shortcuts in translation 2020-03-29 20:17:00 +02:00
Binnette
00d42c5b03
Improve documentation (#746)
Add docs: setup a dev environment and server administration
2020-02-26 21:31:39 +01:00
Lars Lingner
90c7b38114
Update ubuntu from scratch doc
I had to add a config for /static and /uploads folder in nginx when I set DEBUG = False
2019-10-08 10:06:30 +02:00
Asish Abraham Joseph
7c20190e01
Added missing dependency packages
Added missing ownership to deployment directories
2018-11-15 11:41:58 +05:30
Yohan Boniface
fbb7125167 Merge changelogs and add first changelog for 1.0.0 2018-06-16 13:53:06 +02:00
Yohan Boniface
4c8b6f79de Fallback looking for settings file at /etc/umap/umap.conf
fix #487
2017-05-10 19:14:35 +02:00
Yohan Boniface
ea7ecbfc6d Change pip install instruction in doc 2017-02-06 16:34:23 +01:00
Yohan Boniface
b374ad6479 Add a not in the tutorial about adding more tilelayers and such 2016-11-26 17:39:10 +01:00
Yohan Boniface
8b3d8c5ece Add a migration to create a Licence if none exists 2016-11-26 17:29:00 +01:00
Yohan Boniface
3c32377c42 Add a migration to create a TileLayer if none exists 2016-11-26 17:25:59 +01:00
Yohan Boniface
9de6a6ae0a Tutorial: install from github for now
=
2016-09-24 07:38:57 +02:00
Yohan Boniface
2206c6a1c4 add storagei18n in Ubuntu tutorial 2016-09-11 13:05:38 +02:00
Yohan Boniface
07e6b62012 Ubuntu installation turorial draft 2016-09-10 16:21:09 +02:00