1

I had setup a virtual host for the osm tile server. All the tables are made and style sheet is generated using mapnik using this tutorial:https://www.linuxbabe.com/ubuntu/openstreetmap-tile-server-ubuntu-20-04-osm

The only process I changed here is using service instead of systemctl as the latter is not supported. I have named the vhost as tile.gearmap.com in the config files. These are the files: -

/etc/apache2/sites-available/tileserver_site.conf

   <VirtualHost *:80>
        ServerName tile.gearmap.com
        LogLevel info
        Include /etc/apache2/conf-available/renderd.conf


    </VirtualHost>

/etc/renderd.conf



[renderd]
stats_file=/run/renderd/renderd.stats
socketname=/run/renderd/renderd.sock
num_threads=10
tile_dir=/var/cache/renderd/tiles


[mapnik]
plugins_dir=/usr/lib/mapnik/3.1/input
font_dir=/usr/share/fonts/truetype
font_dir_recurse=true


; ADD YOUR LAYERS:
[default]
URI=/osm/
XML=/home/osm/openstreetmap-carto/style.xml
HOST=tile.gearmap.com

https://www.linuxbabe.com/ubuntu/openstreetmap-tile-server-ubuntu-20-04-osm

[Service]
User=osm

Result of Apache2 server status enter image description here

I also added the third line to hosts hoping it would work:

enter image description here

However, when I open http://tile.gearmap.com/osm/0/0/0.png in my chrome, it shows 404 error instead of the map tile. This is all done in wsl ubuntu 20.04 and browser is in windows. Please help me find the error. If any additional files are needed to debug this, let me know.

1 Answers1

0

Check if the traffic is exposed over tcp4 or tcp6 (try netstat within Ubuntu), there is a longstanding issue of WSL2 not supporting ipv6: https://github.com/microsoft/WSL/issues/4518

prusswan
  • 6,853
  • 4
  • 40
  • 61