Skip to content
Snippets Groups Projects
Commit b6f72198 authored by David Hoese's avatar David Hoese
Browse files

Merge branch 'bugfix-mapcache-cors' into 'master'

Add CORS headers to MapCache and update resolutions

See merge request cspp_geo/cspp-geo-web-viewer!27
parents a8fffb8a ccef41f4
Branches
No related tags found
No related merge requests found
...@@ -38,12 +38,9 @@ ENV APACHE_SERVER_NAME localhost ...@@ -38,12 +38,9 @@ ENV APACHE_SERVER_NAME localhost
# install httpd runtime dependencies # install httpd runtime dependencies
# https://httpd.apache.org/docs/2.4/install.html#requirements # https://httpd.apache.org/docs/2.4/install.html#requirements
RUN mkdir -p /build_deps && cd /build_deps && apt-get -y install apache2 apache2-dev libapache2-mod-fcgid && \ RUN mkdir -p /build_deps && cd /build_deps && apt-get -y update && \
ls /etc/apache2/mods-available && \ apt-get -y install apache2 apache2-dev && \
ls /etc/apache2/mods-enabled && \ a2enmod actions setenvif rewrite headers && \
apt-get -y install libapache2-mod-php7.2 php7.2-common php7.2-cli php7.2-fpm php7.2 && \
a2enmod actions proxy_fcgi setenvif cgi fcgid rewrite && \
a2enconf php7.2-fpm serve-cgi-bin && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
......
LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so
#LoadModule mapcache_module modules/mod_mapcache.so
# handler should be added by fcgi module
#AddHandler fcgid-script fcgi
#<IfModule mod_fcgid.c>
# FcgidIOTimeout 120
# FcgidMaxProcessesPerClass 10
# FcgidInitialEnv "MAPCACHE_CONFIG_FILE" "/work/mapcache/mapcache.xml"
# FcgidInitialEnv PROJ_LIB /usr/local/share/proj
# FcgidInitialEnv LD_LIBRARY_PATH "/usr/local/lib:/usr/local/pgsql/lib:/usr3/pkg3/oracle9/lib"
# <Location /map.fcgi>
# Order Allow,Deny
# Allow from all
# SetHandler fcgid-script
# </Location>
# #ScriptAlias /map.fcgi "/work/mapcache/src/mapcache"
#</IfModule>
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<extent>-5434894.885 -5434894.885 5434894.885 5434894.885</extent> <extent>-5434894.885 -5434894.885 5434894.885 5434894.885</extent>
<units>m</units> <units>m</units>
<!-- Full image at the base level -> divided by 2 gets us 7 zoom levels--> <!-- Full image at the base level -> divided by 2 gets us 7 zoom levels-->
<resolutions>42460.1163 16000.0 8000.0 4000.0 2000.0 1000.0 500.0</resolutions> <!-- <resolutions>42460.1163 16000.0 8000.0 4000.0 2000.0 1000.0 500.0</resolutions>-->
<resolutions>42460.1163 16032.138304 8016.069152 4008.034576 2004.017288 1002.008644 501.004322</resolutions>
<origin>top-left</origin> <origin>top-left</origin>
</grid> </grid>
{% endfor %} {% endfor %}
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
# after it has been globally disabled with "a2disconf". # after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf #Include conf-available/serve-cgi-bin.conf
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
<IfModule mapcache_module> <IfModule mapcache_module>
<Directory /work/mapcache> <Directory /work/mapcache>
Require all granted Require all granted
</Directory> </Directory>
MapCacheAlias /mapcache "/work/mapcache/mapcache.xml" MapCacheAlias /mapcache "/work/mapcache/mapcache.xml"
</IfModule> </IfModule>
SetEnv "MAPCACHE_CONFIG_FILE" "/work/mapcache/mapcache.xml" SetEnv "MAPCACHE_CONFIG_FILE" "/work/mapcache/mapcache.xml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment