I need help for my awstats problem I got 404 when I'm going to access awstats/awstats.pl
. below is the current awstats.conf
file.
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>
and this is the current module running in my apache2.
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)
and this is what I've got on my access.log
"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"
I tried to google the possible solution but unfortunately got the same error.
I really need your help guys :( thanks a lot for those who can help me with this error, I got stuck on this part.
this is my chef recipe for awstats
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