Why not ask your question on the new 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     *.;

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

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

upstream my_servers {                           

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

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

accept rate: 15%

edited 12 Apr '21, 11:20


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



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:


question asked: 12 Apr '21, 10:26

question was seen: 2,064 times

last updated: 12 Apr '21, 13:58

powered by OSQA