mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.11k stars 444 forks source link

How to change port from 8080 to 443 #314

Closed shiva280621 closed 2 years ago

shiva280621 commented 2 years ago

By default Nominatim is on port 8080, how do i change from 8080 to 443?

My organization can't whitelist 8080 port due to security reasons, how do i change it to 443?

Should i change the port in the docker run command, orelse can i change after docker is running with Nominatim on 8080.

Currently Nominatim is running on 8080 port, can i change it now? orelse should i format the disk and run the docker image again?

Command used to run Docker Image: docker run -it --rm --shm-size=100g -e threads=32 -e PBF_URL=http://download.geofabrik.de/north-america-latest.osm.pbf -e IMPORT_WIKIPEDIA=false -e NOMINATIM_PASSWORD=very_secure_password -v nominatim-data:/var/lib/docker/postgresql/12/main -p 8080:8080 --name nominatim mediagis/nominatim:4.0

Azure VM(RHEL 7.7) Docker version 19.03.15, build 99e3ed8919 Nominatim Version: 4.0

mtmail commented 2 years ago

443 is the default port for SSL encrypted connection (https), which requires an app or webserver to use a SSL certificate. Or rather anybody connecting to the app or webserver using port 443 will expect an encrypted connection. Only changing the port won't be enough as the connection woudl remain unencrypted.

nominatim-docker has no such capabilities. Check inside your organization how SSL and certificates are usually deployed, they might have specific requirement on the certificates type or namespace and/or experience how to add a proxy around an existing app like nominatim-docker.

philipkozeny commented 2 years ago

In that case you want something like nginx or caddy to run in front of nominatim as a reveres proxy and serve the requests via https / 443 and route them to the docker container. Here would be an example for caddy: https://github.com/mediagis/nominatim-docker/issues/159#issuecomment-732125468