Root/var/Index index.php index.html index.htm Īuth_basic " Please enter your password: " Īuth_basic_user_ FILE/VAR/WWW/VHOSTS/HTPASSWD Server_name Access_log/var/log/www/access.log main If you see it generate a bunch of web pages, that means success. The last manual execution of the awstats.sh awstatsprog=/usr/local/awstats/into Crontab. dir=/var/statistics Results Output directory update-config=Update Configuration Entry usr/local/awstats/tools/awstats_ Awstats static page generation tool config=- awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/ Mkdir-p/var//usr/local/awstats/tools/awstats_-update Mkdir-p/var/Of course, you can also use the script to achieve:Įxport path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin Create a directory that holds awstats generated static files Create a directory where Awstats is used to record dataĥ. The%yyyy-24/%mm-24/%dd-24 indicates that the date of the year is minus 24 hours, which is the log directory of yesterday.Ĥ. The full path above is the Nginx log file that is saved after the cut. Vi/etc/awstats/awstats.Put logfile= "/var/log/httpd/mylog.log" The disadvantage is that I cut a log one day, you have to wait until the next day to see some of yesterday's detailed data. is not to let the awstats to time-sharing is constantly increasing the log is being written, the advantage is not to omit data, and analysis has been cut completed log, not to worry about conflict. Because I was cutting the log by day, after cutting finished to Awstats to analyze. #回车完成配置文件的创建Īfter the configuration file is created, we're going to have to revise it. Youcan also build static on pages for ' Nginx ' with command:> Perl -output=pagetype-config=nginx Pressenter to finish. Youcan then manually update your statistics for ' ' Withcommand: > Perl -update-config=ngi NX nf you should have a lookinside to check and change manually main parameters. Or If you have several config files and prefer have only Onecommand:/usr/local/awstats/tools/aws tats_ nowĪ simple config file has been created:/etc/awstats/awstats. You can does it manually by adding the following command to Yourcron:/usr/local/awstats/wwwroot/cgi-bin/-up Date-config=nginx > Add updateprocess inside a scheduler Sorry, does not support automatic cron addto. >create config file '/etc/awstats/ 'Ĭonfigfile/etc/awstats/ Created. > #直接回车, define the path to your configuration file, use the default path/etc/awstats >define config file path in which directory does you have your config file (s)?ĭirectoryPath to store config file (s) (Enter Fordefault): >#这里输入你要分析的域名, or any one of your easy to remember configuration name and enter Yourweb site, virtual Server or profile name: What is the name of your Web site or profile? >need To create a new config file? Do and want me to build anew AWStats config/profilefile (required if I install) ? Y #这里选Y, creating a new configuration file >update Model config file '/usr/local/awstats/' file Updated. AWStats Setup documentation (file docs/index.html) Script as a CGI, if you want Tobuild reports dynamically. Youwill need to the setup your Web server manually to declare AWStats Yourweb Server config file (s) could not is found. >none #这里添none并回车 because we're not using Apache > Running OS detected:linux, BSD OrunixĮnterfull config file path of your WEB server.Įxample:/usr/local/apache2/conf/nfĮxample:c:program filesapache nf Config file path (' None ' to skip Web server Setup): Tar zxf awstats-7.3.tar.gz & mv Awstats-7.3/usr/local/awstatsĬhmod +x/usr/local/awstats/Configuration Wizard in the Tools directory to create a new statistic: Place the Log_format code in the HTTP definition section of your nginx, which you can reference in each of the following servers, without having to define the format in each server.Įxport Path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binĭate_dir=$$ (date-d "-2 Day" + "%Y")/$ (date-d "-2 Day" + "%m")/$ (date-d "-2 Day" + "%d")/Īnd threw it into the crontab, and every night 11:57 to perform the cutting: ' $http _user_agent ', ' $http _x_forwarded_for ', ' $request _time ' ' $status $body _bytes_sent ' $http _referer ' Log_format Main ' $remote _addr-$remote _user ' $request '
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |