koo*_*gee 8 awstats apache-2.2 ubuntu-12.04
我是 apache 的新手,我正在尝试在我的 ubuntu 12.04 服务器上设置 AWStats。我遵循了 Ubuntu docs 上的指南。
我根据说明进行了设置,awstats 能够成功地从 apache 日志生成初始统计信息。我将 awstats 的链接放在默认的虚拟主机文件中。但是,当我尝试运行时http://server-ip-address:8080/awstats/awstats.pl
,我得到:
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/apache2/sites-available/default
文件:
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /home/saad/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/saad/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我编辑的唯一三个变量/etc/awstats/awstats.conf
是:
LogFile="/var/log/apache2/access.log"
SiteDomain="server-name.noip.org"
HostAliases="localhost 127.0.0.1 server-name.no-ip.org"
Run Code Online (Sandbox Code Playgroud)
apache 服务器工作正常,我能够访问存储在服务器上的其他页面。欢迎任何指导。
更新:
事实证明,除了awstats.conf
文件之外,您还必须编辑awstats.server-name.no-ip.org
文件才能使其工作。wiki 说明只能编辑自己创建的 conf 文件。一旦我编辑了awstats.conf
它本身,它就开始工作了。
设置(“/etc/awstats/awstats.conf”文件、Web 服务器或权限)可能错误。
看起来 awstats cgi 脚本无法读取配置文件。确保网络服务器用户(通常是 www-data)可以读取此文件。
归档时间: |
|
查看次数: |
3844 次 |
最近记录: |