[MapProxy] Need help installing MapProxy embeded in Apache
Cao Minh Tu
caominhtuvn at gmail.com
Wed Apr 17 20:57:26 PDT 2013
I solved the problem.
It was because I didn't give www-data ownership to sub-directories of
cached_tiles in allowing access for apache2 wsgi step
Just change the commands to recursively apply to sub-directories and
everything went fine:
sudo chown www-data -R /etc/mapproxy/cached_tiles
sudo chgrp www-data -R /etc/mapproxy/cached_tiles
2013/4/18 <mapproxy-request at lists.osgeo.org>
> Send MapProxy mailing list submissions to
> mapproxy at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.osgeo.org/mailman/listinfo/mapproxy
> or, via email, send a message with subject or body 'help' to
> mapproxy-request at lists.osgeo.org
>
> You can reach the person managing the list at
> mapproxy-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MapProxy digest..."
>
>
> Today's Topics:
>
> 1. Need help installing MapProxy embeded in Apache (Cao Minh Tu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 17 Apr 2013 17:57:55 +0700
> From: Cao Minh Tu <caominhtuvn at gmail.com>
> To: mapproxy at lists.osgeo.org
> Subject: [MapProxy] Need help installing MapProxy embeded in Apache
> Message-ID:
> <CAHTTaU2gMX-Yr10sbZiRkbYiDWZbuVr4nRCuFYN7p=
> bb0RNc9A at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi list,
>
> I am a newbie finding ways to implement MapProxy as a tile cache server.
> Right now I am testing it on a clean Ubuntu 12.04 64 bit virtual machine
> with Google map tiles source and instructions found here:
> http://lists.osgeo.org/pipermail/mapproxy/2012-February/000976.html (I
> added some twists to the instruction).
>
> **** My configuration file (mapproxy.yaml):*
> services:
> demo:
> wmts:
>
> sources:
> gm:
> type: tile
> url: http://mt0.google.com/vt/lyrs=m@0&hl=en&x=%(x)s&y=%(y)s&z=%(z)s
> grid: gm_grid
>
> grids:
> gm_grid:
> base: GLOBAL_MERCATOR
> origin: ul
>
> caches:
> gm_cache:
> grids: [gm_grid]
> sources: [gm]
> cache_dir: /etc/mapproxy/cached_tiles
> cache:
> type: file
> directory_layout: tc
>
> layers:
> - name: layer
> title: tiles
> sources: [gm_cache]
>
> **** My installation process:*
> #On a Debian or Ubuntu system, you need to install the following packages:
> sudo apt-get install python-imaging python-yaml libproj0
> #To get all optional packages:
> sudo apt-get install libgeos-dev python-lxml libgdal-dev python-shapely
> #install easy_install
> sudo apt-get install python-setuptools
> #install pip
> sudo easy_install pip
> #install mapproxy
> sudo pip install MapProxy
> #copy an existing configuration to /etc/mapproxy.yaml
> sudo cp mapproxy.yaml /etc/mapproxy.yaml
> #install apache
> sudo apt-get install apache2
> #install mod-wsgi on apache2
> sudo apt-get install libapache2-mod-wsgi
> #create wsgi python application file 'config.py'
> sudo mapproxy-util create -t wsgi-app -f /etc/mapproxy.yaml
> /etc/mapproxy/config.py
> #edit file /etc/apache2/sites-available/default
> sudo gedit /etc/apache2/sites-available/default
> #add lines:
> WSGIScriptAlias /mapproxy /path_to_config/config.py
> <Directory /path_to_config/>
> Order deny,allow
> Allow from all
> </Directory>
> #mapproxy yaml contains paths to cache_directories, allow access for
> apache2 wsgi
> sudo chown www-data /etc/mapproxy/cached_tiles
> sudo chgrp www-data /etc/mapproxy/cached_tiles
> #load configuration into apache by restarting apache
> sudo apache2ctl restart
>
> **** Problem:*
> When I run the develop server from the terminal: sudo mapproxy-util
> serve-develop /etc/mapproxy.yaml
> and access the web page locally (
>
> http://127.0.0.1:8080/demo/?wmts_layer=layer&format=%3Cbuilt-in%20function%20format%3E&srs=EPSG%3A900913
> )
> everything was fine.
> When I access "http://ip_of_ubuntu_server/mapproxy" from another computer,
> the map was loaded with already cached tiles only, *all new tiles
> (uncached) won't display*.
>
> Is this a problem with Apache user privileges or something else - can
> anyone show me how to fix it? (I am a newbie in everyhing: Linux, Apache,
> Python, MapProxy)
>
> Any help appreciated!
>
> Thanks a lot!
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/mapproxy/attachments/20130417/756b3743/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>
> End of MapProxy Digest, Vol 38, Issue 9
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130418/5dbeaf6f/attachment.html>
More information about the MapProxy
mailing list