So, I have succesfully installed my own map tile server using this guide: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ Everything went perfect, but now, I dont know how to start consuming my service in my WEB page using leaflet: L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(map); I have a ddns and I want to catch my service. What kind of routing should I do in my router to point to my Tile Server? What number of internal port should I use to point to the server machine and consume the service from the outside? And then, how should the link look like? Im assuming it should be something like: 'http://MyDdns:OuterPort/Mod_tiles/{z}/{x}/{y}.png' Am I wrong? Is there a way to protect the acces to the service to be restrictive, via a key or of the sorts? asked 01 Feb '19, 13:58 Leo_1991 aseerel4c26 ♦ |
Set up your router to forward whatever port you want to forward to your internal server to that server on the same or another port.
The config file for “renderd” is “/usr/local/etc/renderd.conf”. Your version of that probably refers to a map style called "ajt" so the full path to a file would be something like https://yourdns:yourport/hot/0/0/0.png .
permanent link
This answer is marked "community wiki".
answered 01 Feb '19, 14:21 SomeoneElse ♦ Thank you for your answer! But now it throws an "ERR_CONNECTION_REFUSED", I have all ports closed by default.Must I have any other opened?
(01 Feb '19, 15:51)
Leo_1991
I tried an nmap on the domain, and the port 5000, the one I configured on router pointing to tile server throws the following: PORT STATE SERVICE REASON 5000/tcp closed upnp conn-refused Other ports wich I have open and running other services clearly specifies the service being run...
(01 Feb '19, 16:21)
Leo_1991
2
Oh oh oh oh, I see where is my error now. The internal port should be an specific one. Now everything is fine and up running. Thank you!
(01 Feb '19, 16:35)
Leo_1991
|
I've moved the new question that was "asked" as an answer here to https://help.openstreetmap.org/questions/68798/how-to-make-a-tile-server-on-my-lan-externally-accessible .