Monthly Archives: August 2013

Awstats on Debian

Awstats is a statistics utility that get’s the data from the logs of apache, proftpd etc. The easiest way to install the software is explained here https://help.ubuntu.com/community/AWStats.

I had to do one thing after the install. I had to create symbolic links to the images that was missing.
I just had to remove the s in the end of the word awstats in the apache config. The code is located in /etc/apache2/sites-available/default The original code from the instruction is shown below:

Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstatsicons/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

The code after the change should look like the following.

Alias /awstatclasses "/usr/share/awstats/lib/"
Alias /awstaticons/ "/usr/share/awstats/icon/"
Alias /awstatcss "/usr/share/doc/awstats/examples/css"
ScriptAlias /awstat/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

You can find 3 of my awstats pages here. I will show you how to enable FTP logging and for a subdomain in awstats in a later post.
http://goggel.org/awstats/awstats.pl
http://ftp.goggel.org/awstats/awstats.pl
http://wordpress.goggel.org/awstats/awstats.pl

WordPress on a Debian server

This is a short HowTo on configuring WordPress on a Debian server and set it up as a subdomain.

I used the following manual to get myself started. I’m using a LAMP server so I have everything preinstalled on the server. https://help.ubuntu.com/community/WordPress

When I go to the step where I was supposed to add the following command I had to prepeare the subdomain.

sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress_mydomain_org wordpress.mydomain.org

I then opened my DNS Control Window at my DNS supplier and created a subdomain called wordpress.goggel.org using an A record pointing to my IP address. Now the traffic was forwarded to my server, but it was sent to my default page: http://goggel.org.

I then opened up my apache config that in my debian installation is located in

/etc/apache2/sites-available/default

I opened the file using nano (nano /etc/apache2/sites-available/default) and added the following configuration.


ServerAdmin webmaster@localhost
ServerName wordpress.goggel.org
ServerAlias www.wordpress.goggel.org
DocumentRoot /usr/share/wordpress

Options FollowSymLinks
AllowOverride None

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

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 /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


You don’t need the lines containing the word awstats. That is just for my statistics that I will talk moreĀ about in a laterĀ post.
After a reload of the Apache server with the command /etc/init.d/apache2 reload you should be good to go on with the rest of the tutorial.