3liz / lizmap-docker-compose

Run Lizmap stack with docker-compose
31 stars 42 forks source link

LIZMAP_PORT changed to 80 but not updated on View Metadata #24

Open ocastillog opened 2 years ago

ocastillog commented 2 years ago

Hello guys,

I'm using Lizmap 3.5 with Docker on Ubuntu Server 20.04

I have the following issue after changing to 80 the LIZMAP_PORT on env.default file.

Port 80 is not showing after clicking on the "View Metadata" button or in the "Information Panel" after loading the map.

The "WMS Url " and "WMTS Url" links at the "Web Map Service" section are showing 8080 port in the URL address.

dmarteau commented 2 years ago

LIZMAP_PORT is the port mounted on the host network, in the container the lizmap service is still using the port 8080. I would suggest that you have a look at port mapping in Docker: https://docs.docker.com/config/containers/container-networking/

ocastillog commented 2 years ago

Thank you David for your repply:

Still not sure if I have to change to port 80 on nginx or lizmap container.

Maybe I have to edit the docker-compose.yml like this?

The WMS and WMTS URLs are still using 8080 port.

Best regards, Osmin Castillo

dmarteau commented 2 years ago

Do not change the port number in the docker-compose.yml: this is the internal exposed port from inside the container.

You have an issue about proxified urls: the lizmap service is requesting the map server on the port 8080, so the server respond with WMS urls set to the 8080 port.

If you acces the directly the map server (try http://localhost:8091/ows/?service=WFS&request=GetCapabilities&MAP=test_france_parts/france_parts) then you will have the correct 8091 port number because you are accessing the service from 8091.

This is a bug from lizmap that do not know which port is used externally (from outside the docker compose stack).

dmarteau commented 2 years ago

ATM, you should not consider the urls returned from lizmap as relevant (see the issue above). If you want direct access to the map server OWS api, consider requesting the map service directly on its publicly exposed port.

Gustry commented 2 years ago

If you want direct access to the map server OWS api, consider requesting the map service directly on its publicly exposed port.

This should be avoided, in the long term. QGIS Server mustn't be accessible directly indeed. Lizmap is doing ACL about projects, layers and features which are visible or not.