# Pureftpd and awstats

## ColeSlaw

I've installed awstats on my home server and it works perfectly for my webpage.  I saw on the AWStats page that it also supports FTP servers, but I'm having a hard time configuring mine to read the stats off my pureftpd server.  If anybody knows how to set this up I would appreciate it.  I've installed pureftp and awstats both from portage.

Thanks for any help that you can provide!

----------

## SilverOne

Ok, I know it's a little late for a response   :Wink: 

But I've been struggling with this as well, and I got a sort of working configuration.

The steps I took are in short:

- let pure-ftpd log with the CLF log format, using the -O option in it's startup:  -O clf:/var/log/pure-ftpd

- create a new awstats configuration:  cp /etc/awstats.model.conf /etc/awstats.pure-ftpd.conf

- set the settings as you'd like (and see HERE for general awstats FTP settings )

- set the logformat parameter to:  LogFormat="%host %other %logname %time1 %methodurlnoprot %code %bytesd"

Then run the statistics as usual...

Notes:

- I only run one server (i.e. no ftp virtual hosts)

- Right now it does not log uploads different from downloads (the log file is ok, but the statistics just adds them up).  Anyone have an idea to fix that?

- It groups totals by host, by user, by file giving a decent overview.

- the pure-ftpd manual recommends the "stats" logfile type.  Awstats does not support this, nor do I think it recognizes the W3C format (time parameter is wrong).  Since xferlog is supposed to be broken, I chose CLF

- If you have several different statistics files (awstats.XXXX.conf) THIS helps keep track of them.

Hope this helps somebody.

----------

