This is the demo web application for IP2Location Contest.
It shows visits history with location, based on IP2Location™ LITE IP-COUNTRY free database and Silgy as a web application framework.
It's live here: silgy.org:2020
The demo is running on AWS EC2 Linux t2.micro instance (Amazon Linux AMI release 2018.03
).
sudo yum install -y gcc-c++
sudo yum install -y mysql-server mysql
Optionally:
sudo yum install -y mysql-devel
ip2location_db3
(as per IP2Location cheat sheet)visits
:
create table visits
(
id int auto_increment primary key,
ip char(60),
country_code CHAR(2),
region_name VARCHAR(128),
city_name VARCHAR(128),
method char(15),
uri varchar(250),
referer varchar(250),
uagent varchar(250),
lang char(5),
ua_type char(1),
bot char(1),
ad char(1),
session_id int,
status smallint,
processing float,
created datetime
);
The database name and credentials (along with the listening port number) are in bin/silgy.conf
.
cd src
chmod u+x m
cd src
./m
(You may need to verify MySQL include and library paths in m
, depending on your configuration)
- Verify
$SILGYDIR
is correct (the existing code assumes it's/home/ec2-user/ip2loc
) - Make them executable:
chmod u+x silgystart
chmod u+x silgystop
cd bin
./silgystart
Don't forget to add an inbound security rule to allow traffic to your port.
logs
directory should contain something useful. Anyway I'll be happy to help at silgy.help@gmail.com.