首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在centos 7.2的服务器上找不到请求的URL /awstats/awstats.pl

在centos 7.2的服务器上找不到请求的URL /awstats/awstats.pl
EN

Stack Overflow用户
提问于 2016-12-05 09:41:37
回答 1查看 1.5K关注 0票数 1

我需要帮助解决我的awstats问题,当我要访问awstats/awstats.pl时,我得到了404。下面是当前的awstats.conf文件。

代码语言:javascript
复制
Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"

<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<Directory "/usr/share/awstats/wwwroot/cgi-bin/">
    DirectoryIndex awstats.pl
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Directory>

# Additional Perl modules
<IfModule mod_env.c>
    SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
</IfModule>

这是我的apache2中运行的当前模块。

代码语言:javascript
复制
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
headers_module (shared)
limitipconn_module (shared)
log_config_module (shared)
logio_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
perl_module (shared)
rewrite_module (shared)
setenvif_module (shared)
status_module (shared)
systemd_module (shared)
unixd_module (shared)
php5_module (shared)

这就是我在access.log上看到的

代码语言:javascript
复制
"GET /awstats/awstats.pl HTTP/1.1" 404 216 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36"

我试图谷歌可能的解决方案,但不幸的是,也得到了同样的错误。

我真的需要你的帮助,伙计们:(非常感谢那些能帮我解决这个错误的人,我被困在这部分了。)

这是我的主厨做的

代码语言:javascript
复制
include_recipe "yum-epel"
include_recipe "awstats"

%w(apachetraffic).each do |rule|
    iptables_rule rule do
        action :enable
    end
end

%w(awstats perl-Geo-IP).each do |pkg|
    package "#{pkg}" do
        action [:install]
    end
end

directory "#{node['awstats']['db_dir']}" do
  action :create
end

template "#{node['apache']['dir']}/conf.d/awstats.conf" do
  source "awstats/awstats.conf.erb"
    owner "root"
    group "root"
    mode 0644
    notifies :restart, 'service[apache2]', :delayed
end

# template "#{node['apache']['dir']}/conf-available/awstats.conf" do
#   source "awstats/awstats.conf.erb"
#   owner "root"
#   group "root"
#   mode 0644
#   notifies :restart, 'service[apache2]', :delayed
# end

template "#{node['awstats']['config_dir']}/awstats.#{node['awstats'] ['http_config']}.conf" do
    source "awstats/awstats.http.erb"
    owner "root"
    group "root"
    mode 0644
    variables(
        :logfile => node["awstats"]["logfile"],
        :site_domain => node["awstats"]["site_domain"],
        :db_dir => node["awstats"]["db_dir"],
        :geo_ip_dir => node["awstats"]["geo_ip_dir"]
    )
    notifies :restart, 'service[apache2]', :delayed
end

if node["awstats"]["has_ftp"]
    template "#{node['awstats']['config_dir']}/awstats.#{node['awstats']['ftp_config']}.conf" do
        source "awstats/awstats.ftp.erb"
        owner "root"
        group "root"
        mode 0644
        variables(
            :logfile => '/var/log/xferlog',
            :site_domain => node["awstats"]["site_domain"],
            :db_dir => node["awstats"]["db_dir"],
            :geo_ip_dir => node["awstats"]["geo_ip_dir"]
        )
        notifies :restart, 'service[apache2]', :delayed
    end
end
EN

回答 1

Stack Overflow用户

发布于 2016-12-06 10:38:07

我的队友解决了这个问题,这一切都是关于apache status_allow_list的。)谢谢大家努力解决这个问题。日安。:)

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40971229

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档