Open michal-sedek-ihub opened 2 years ago
Hi @michal-sedek-ihub; never tried using nginx but my two cents:
location
and proxy_pass
tileserver-gl
is not so much rev proxy friendly so you need to help it by passing an argument to tell that it is running under a rev proxy: --public_url http://localhost:7070/maptiler
HTH, Matteo
Hi Matteo,
Thanks for answering, I added --proxy_url
but the docker image says, that it doesn't know what that means, so i changed it to -u
, and ... still nothing :)
Now I have in docker-compose.yml sth like that:
maptiler:
image: ${IMAGE_PATH}maptiler:local
container_name: maptiler-local
command:
- "-p 8080"
- "-c /data/config.json"
- "-V"
- "- http://localhost:7070/maptiler"
expose:
- "${MAPTILER_EXPOSED_PORT}"
ports:
- "${MAPTILER_EXPOSED_PORT}:${MAPTILER_INTERNAL_PORT}"
And the page is loading, but all links direct to http://localhost:7070/...
and not to http://localhost:7070/maptiler/...
(ex. styles should be at http://localhost:7070/maptiler/styles/
but all links direct to http://localhost:7070/styles
, and even if I go directly to http://localhost:7070/maptiler/styles/
I get Cannot get //styles/
error). It is like -u
doesn't propagate through the frontend links :)
If i remove the -u
and go to the http://localhost:8080
(8080 is the MAPTILER_EXPOSED/INTERNAL_PORT) everything is working fine, but it isn't going through proxy (and i need it behind proxy :) )
Thanks, Michal
I know this is old, but does the new information at https://maptiler-tileserver.readthedocs.io/en/latest/deployment.html#nginx-reverse-proxy help with these questions?
Hello, I 'm trying to install maptiler behind the nginx proxy, and I'm stuck. In nginx conf i have: ` location /maptiler { client_max_body_size 10M;
in maptiler dockerfile config just:
FROM maptiler/server
and in docker-compose.yml:
`maptiler: image: ${IMAGE_PATH}maptiler:${TAG} container_name: maptiler-${TAG} ports:
And in nginx logs when I try to go to http://localhost:7070/maptiler i'm getting only:
192.168.0.1 - - [18/Feb/2022:11:34:33 +0000] "GET /maptiler HTTP/1.1" 200 1255 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36"
But on screen i get "Loading..." and nothing more :/ and when i try to go to localhost:7070/maptiler/admin i get 404 error
Can you please tell me what i'm doing wrong? :) Or what should i do different to get the server working?