Skip to content
Snippets Groups Projects
Commit 41181f2a authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Fixes GeoIP

parent 877a0e2d
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,10 @@ RUN apt-get update && apt-get install -y \
unzip piwik.zip && \
mv /piwik/config /piwik-config && \
sed -i 's/;always_populate_raw_post_data = -1/always_populate_raw_post_data=-1/g' /etc/php5/fpm/php.ini && \
cd /piwik/misc/ && \
curl http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz > GeoLiteCity.dat.gz && \
gunzip GeoLiteCity.dat.gz && \
mv GeoLiteCity.dat GeoIPCity.dat && \
sed -i 's/# exec CMD/# exec CMD\n\/opt\/startup-piwik.sh/g' /opt/entrypoint.sh
# install nginx piwik config
......
......@@ -242,3 +242,12 @@ if ! grep -q adapter /piwik/config/config.ini.php; then
sed -i '/\[database\]/a adapter=MYSQLI' /piwik/config/config.ini.php
fi
# Fix IP behind proxy
if ! grep -q proxy_client_headers /piwik/config/config.ini.php; then
sed -i '/\[General\]/a proxy_client_headers[] = HTTP_X_FORWARDED_FOR' /piwik/config/config.ini.php
fi
if ! grep -q proxy_host_headers /piwik/config/config.ini.php; then
sed -i '/\[General\]/a proxy_host_headers[] = HTTP_X_FORWARDED_HOST' /piwik/config/config.ini.php
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment