0
0
Fork 0
haikuports/www-servers/lighttpd/additional-files/quickstart-geoip.txt

21 lines
1.1 KiB
Plaintext

A GeoIP module is officialy included in lighttpd since release 1.4.42.
To use it you have to download the GeoIP.dat or GeoLiteCity.dat databases from
http://maxmind.com/
You can do so manually, or with the geoipupdate command from the geoipupdate
package or the geoipupdate.sh script from the geoip package (which provides the
libGeoIP.so shared library needed by mod_geoip.)
You will also need to edit /system/settings/lighttpd/conf.d/geoip.conf to
uncomment the line with the geoip.db-filename parameter.
Finally, you will need to edit /system/settings/lighttpd/modules.conf to
enable mod_geoip by uncommenting the line with the following directive:
include "conf.d/geoip.conf"
A demo geoip page is /system/data/www/htdocs/geoip/index.lighttpd.shtml
and can be accessed by pointing your browser to http://yourserver/geoip/
Reminder: GeoIP data is not available for private network addresses as defined
in rfc1918 (e.g. 192.168.x.y) so you won't see any GeoIP data unless you access
your web server from a public IPv4 address.
Warning: You should only expose your web server if you know what you are doing.