nginx 支持perl 搭建 awstats-willard
安装NGINX,并支持fastcgi perl下载 tengine-1.5.0.tar.gz
tar zxf tengine-1.5.0.tar.gz
cd tengine-1.5.0
yum -y install pcre-devel GeoIP-devel
./configure --prefix=/usr/local/nginx --with-http_geoip_module=shared
vi vhost.conf
server {
listen 80;
server_namelocalhost;
root /usr/local/awstats/wwwroot;
index index.php;
location ~* .pl$ {
fastcgi_pass unix:/VODONE/server/nginx/logs/perl-fcgi.sock;
access_log off;
include fastcgi_params;
}
}
perl加载模块
perl -MCPAN -e 'install "FCGI“
perl -MCPAN -e 'install "Getopt::Long"'
perl -MCPAN -e 'install "IO::All"'
perl -MCPAN -e 'install "Socket"'
perl -MCPAN -e 'install "Geo-IP"'
perl -MCPAN -e 'install "Geo-IPfree"'
#检查模块 查看Getopt::Long.pm是否安装
perl -MGetopt::Long -e "print\"module installed\n\"" 增加下面代码:
vi fastcgi_params
fastcgi_paramSCRIPT_FILENAME $document_root$fastcgi_script_name; 下载 perl-fcgi.pl
下载 start_perl_cgi.sh
启动perl 执行 sh start_perl_cgi.sh
安装 awstats
下载 awstats-7.2.tar.gz
cd /usr/local&& tar zxf awstats-7.2.tar.gz && mv awstats-7.2awstats
cd awstats/tools
./awstats_configure.pl (按提示操作)
mkdir /var/lib/awstats
cd /etc/awstats
开户IP库支持下载 GeoIP.dat.gz, GeoLiteCity.dat.gz ,GeoIPASNum.dat.gz
vi /etc/awstats/awstats.www.a.cn.conf
LogFile="gzip -d
页:
[1]