根据这个两个教程来装的
http://www.ibm.com/developerwork ... ts-nginx/index.html
http://www.akii.org/use-awstats-automatic-analysis-nginx-log.html

在nginx.conf的server里添加以下代码还是无法访问awstats目录下生产的html文件,提示404错误.

但是我上传1个jpg文件到该目录,可以访问.- location ~ ^/awstats/ { # html 静态页面目录

  • root /home/wwwroot/awstats/;
  • index index.html;
  • autoindex on; #可以目录浏览你的多个域名的目录用于分析
  • access_log off;
  • error_log off;
  • charset gb2312; #最好把默认编码改成 gb2312避免浏览器因自动编码出现乱码的情况
  • }
  • - - location ~ ^/icon/ { # 图标目录
  • root /usr/local/awstats/wwwroot;
  • index index.html;
  • access_log off;
  • error_log off;
  • charset gb2312;
  • }复制代码

[ 本帖最后由 GoTop 于 2011-1-12 08:53 编辑 ]