This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to restrict access to my tile server (MapCache) to disallow other websites to use my tile server

1

Hi,

I have a tile server (MapCache) with a personalized map. For client side's rendering I use OpenLayers. I'd like my personalized card to be accessible only on my web site, ie i don't want another website to use my map on my MapCache server.

Is there any solution ?

Thanks

asked 05 Jun '13, 06:28

paulud's gravatar image

paulud
26113
accept rate: 0%

edited 06 Jun '13, 01:56

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

Your question leads me to three questions; Could you tell why you want your map to be visible on your own site only ? Isn’t it the power of open layer that everyone is able and allowed to distribute the data freely ? What’s the relation between OSM and your problem ?

(05 Jun '13, 07:25) Hendrikklaas

Could you tell why you want your map to be visible on your own site only ?

To limit bandwidth overuse.

What’s the relation between OSM and your problem ? However, your question is a MapCache or web server configuration question that has nothing to do with OpenStreetMap and does not belong on this platform.

Mapcache + mapserver are an example of tools to render osm data but the subject is still OSM and solutions that resolve my question

(05 Jun '13, 11:39) paulud

One Answer:

3

MapCache is available as an nginx and an Apache module; both these web servers have configuration options that would let you serve tiles only if the request matches certain conditions (e.g. has the right User-Agent or Referer header, comes from the right IP range, carries the right cookie) which you could probably use to restrict access.

However, your question is a MapCache or web server configuration question that has nothing to do with OpenStreetMap and does not belong on this platform.

answered 05 Jun '13, 07:43

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 05 Jun '13, 07:43

Source code available on GitHub .