NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have a local server. I tried to cache/balance Openstreetmap very simple as you see in bellow:

upstream osm {                           
server  a.tile.openstreetmap.org;
server  b.tile.openstreetmap.org;
server  c.tile.openstreetmap.org;
}

server {
listen        80;
server_name     *.192.168.29.132  192.168.29.132;

   location /myosm/ {
     proxy_pass http://osm;
   }
}

Good to say that I can use upstream for any internal servers correctly like this :

upstream my_servers {                           
 server  192.168.29.100;
 server  192.168.29.101;
}

But I have problem with openstreetmap servers. Any hint is appreciable.

Error is :

Fastly error: unknown domain: osm. Please check that this domain has been added to a service.

Details: cache-fra19124-FRA

asked 12 Apr '21, 10:26

Ehsan_1362's gravatar image

Ehsan_1362
21224
accept rate: 0%


You are sending a host header value of "osm" upstream. That won't work with fastly.

So try adding a

proxy_set_header Host tile.openstreetmap.org;

to the proxy location directive.

Please also note the tile usage policy that you'll have to follow: https://operations.osmfoundation.org/policies/tiles/

permanent link

answered 12 Apr '21, 11:18

Spiekerooger's gravatar image

Spiekerooger
3.1k22356
accept rate: 16%

edited 12 Apr '21, 11:20

1

Thanks for replying. Installing a fresh Nginx, adding

proxy_set_header Host tile.openstreetmap.org;

and finally changing this :

proxy_pass http://osm;

to this:

proxy_pass http://osm/;

saved me.

(12 Apr '21, 12:34) Ehsan_1362
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362
×1

question asked: 12 Apr '21, 10:26

question was seen: 2,283 times

last updated: 12 Apr '21, 13:58

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum