Projet

Général

Profil

Carte de France pour UnivNautes

Design : http://perso.entrouvert.org/~thomas/univnautes/

Aspects techniques

Installation d'un proxy local sur UnivNautes via modif de la config de lighty :
  • mod_proxy
  • redirection vers le proxy :
         url.rewrite-once = (
    +        "^/proxymap(/.*)$" => "$1",
             "^(/.*)$" => "/pffedportal.fcgi$1",
         )
    
  • proxy lui-même :
    +    proxy.server = (
    +        "/" => ((
    +                    "host" => "A.B.C.D",   # obligatoirement une IP
    +        ))
    +    )
    

Note : lighttpd ne sait pas modifier le nom d'hôte interrogé, qui sera donc celui du portail captif ! (par exemple eduspot.univ-truc.fr). Sur A.B.C.D il faut donc un serveur HTTP pour n'importe quel nom :

# machine A.B.C.D /etc/apache2/site-enabled/000-default
<VirtualHost *:80>
        ServerAdmin webmaster@entrouvert.com

        DocumentRoot /var/www/tile

        ProxyPass /osm/ http://tile.openstreetmap.org/
        ProxyPass /mapquest/ http://otile1.mqcdn.com/tiles/1.0.0/map/
        ProxyPass /mapquest-sat/ http://otile1.mqcdn.com/tiles/1.0.0/sat/
        ProxyPass /mapbox/ http://a.tiles.mapbox.com/v3/thomasnoel.map-d79og8w2/
        ProxyPassMatch ^/cm-([0-9]*)/(.*\.png)$ http://a.tile.cloudmade.com/fb5875a3c0324ae2bf26e02b96ea7c41/$1/256/$2

        CacheRoot /var/cache/apache2/mod_disk_cache/tile-univnautes.entrouvert.com/
        CacheEnable disk /
        CacheDefaultExpire 84600
        CacheDirLength 2
        CacheDirLevels 3

        ErrorLog /var/log/apache2/default-proxy-map_error.log
        CustomLog /var/log/apache2/default-proxymap_access.log combined
        LogLevel warn
        ServerSignature Off
</VirtualHost>

Formats disponibles : PDF HTML TXT