-----> Check for web server install Enter full config file path of your Web server. Example: /etc/httpd/httpd.conf Example: /wp-content/local/apache2/conf/httpd.conf Example: c:\Program files\apache group\apache\conf\httpd.conf Config file path ('none' to skip web server setup): #> none 输入none,因为我们要为nginx创建一个新的配置文件 Your web server config file(s) could not be found. You will need to setup your web server manually to declare AWStats script as a CGI, if you want to build reports dynamically. See AWStats setup documentation (file docs/index.html) -----> Update model config file '/wp-content/local/awstats/wwwroot/cgi-bin/awstats.model.conf' File awstats.model.conf updated. -----> Need to create a new config file ? Do you want me to build a new AWStats config/profile file (required if first install) [y/N] ? #> y 输入y,创建一个新的配置文件 -----> Define config file name to create What is the name of your web site or profile analysis ? Example: www.mysite.com Example: demo Your web site, virtual server or profile name: #> jayshao.com 然后一路回车 -----> Define config file path In which directory do you plan to store your config file(s) ? Default: /etc/awstats Directory path to store config file(s) (Enter for default): #> ----> Add update process inside a scheduler Sorry, configure.pl does not support automatic add to cron yet. You can do it manually by adding the following command to your cron: /wp-content/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=jayshao.com Or if you have several config files and prefer having only one command: /wp-content/local/awstats/tools/awstats_updateall.pl now Press ENTER to continue... A SIMPLE config file has been created: /etc/awstats/awstats.jayshao.com.conf You should have a look inside to check and change manually main parameters. You can then manually update your statistics for 'jayshao.com' with command: > perl awstats.pl -update -config=jayshao.com You can also build static report pages for 'jayshao.com' with command: > perl awstats.pl -output=pagetype -config=jayshao.com Press ENTER to finish...
到这里,你的awstats的配置文件就创建了,然后我们需要修改一个设置,
1 2
vi /etc/awstats/awstats.jayshao.com.conf LogFile="/home/wwwlogs/%YYYY-24/%MM-24/access_%YYYY-24%MM-24%DD-24.log"