2,187
edits
(Added "Firewall") |
(Added "AWStats") |
||
Line 381: | Line 381: | ||
</source> | </source> | ||
Note that you won't backup the <code> information_schema </code> table if you need to implement this workaround | Note that you won't backup the <code> information_schema </code> table if you need to implement this workaround | ||
== AWStats == | |||
=== Initial Setup === | |||
# Install the package | |||
#* <code> apt-get install awstats </code> | |||
# Edit the the generic template config file if required | |||
#* <code> /etc/awstats/awstats.conf </code> | |||
# Create apache config file for site with contents show below | |||
#* eg <code> /etc/apache2/sites-enabled/awstats </code> | |||
# Restart apache | |||
#* <code> service apache2 restart </code> | |||
# Site should now be available via URL similar to | |||
#* http://yourserver/awstats/awstats.pl | |||
<pre> | |||
Alias /awstatsclasses "/usr/share/awstats/lib/" | |||
Alias /awstats-icon/ "/usr/share/awstats/icon/" | |||
Alias /awstatscss "/usr/share/doc/awstats/examples/css" | |||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | |||
ScriptAlias /awstats/ /usr/lib/cgi-bin/ | |||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch | |||
</pre> | |||
=== Add a Site === | |||
# Create a specific config file for the site to monitor | |||
#* <code> cp /etc/awstats/awstats.conf /etc/awstats/awstats.mysite.com.conf </code> | |||
# Edit the config file for the site, specifically | |||
#* <code> LogFile=”/path/to/your/domain/access.log” </code> | |||
#* <code> LogFormat=1 </code>(this will give you more detailed stats) | |||
#* <code> SiteDomain=”mysite.com” </code> | |||
#* <code> HostAliases=”www.mysite.com localhost 127.0.0.1" </code> (example for a local site) | |||
# Perform an initial stats gather for the site | |||
#* <code> /usr/lib/cgi-bin/awstats.pl -config=mysite.com -update </code> | |||
# Test that you can see some stats, using URL similar to | |||
#* http://yourserver/awstats/awstats.pl?config=mysite.com | |||
# Add a scheduled job to crontab to update automatically | |||
#* <code> crontab -e </code> | |||
#* EG every 30 mins <code> */30 * * * * /bin/perl /usr/lib/cgi-bin/awstats.pl -config=mysite.com -update >/dev/null </code> | |||
== Troubleshooting == | == Troubleshooting == |