Hello, I have a VPS server running Ubuntu 22.04 and OpenLiteSpeed. I've tried to follow these instructions for installing AWStats, but I'm having difficulty. As you'll see, I'm at beginner level at all this. Note, I've replaced "example.com" everywhere with my site.
I've installed AWStats per the instructions, and I copied the configuration file "cp /etc/awstats/awstats.conf /etc/awstats/awstats.example.com.conf"
With my server configuration, I have no "/var/www" folded. All my sites are in the "/home" directory, like "/home/example.com/public_html". So when editing "/etc/awstats/awstats.example.com.conf", I specified my logfile location properly as "/home/example.com/logs/example.com.access_log"
After the installation, the instructions say to build initial statistics using "/usr/lib/cgi-bin/awstats.pl -config=example.com -update". For me, that doesn't execute unless I put "perl" in front. Then it seems to work, because I see a newly created file awstats052024.example.com.txt in my "DirData" location "/var/lib/awstats". Not sure why I have to specify "perl" but hopefully this is correct.
The instructions say to add the following symlinks
ln -sf /usr/lib/cgi-bin /var/www/html/cgi-bin
ln -sf /usr/share/awstats/icon/* /var/www/html/awstats-icon
Because of my server configuration, I changed these to the following. Note, the second one didn't work until I manually created the /home/example.com/public_html/awstats-icon folder
ln -sf /usr/lib/cgi-bin /home/example.com/public_html/cgi-bin
ln -sf /usr/share/awstats/icon/* /home/example.com/public_html/awstats-icon
Then the instructions say to create a CGI context on the Web Admin using the following
URI=/cgi-bin/
Path=/var/www/html/cgi-bin
As before, I changed this to match my server configuration. Note I added a trailing "/" after "/home/example.com/public_html/cgi-bin" per the instructions on the context page of the Web Admin. After saving this I did a graceful restart.
URI=/cgi-bin/
Path=/home/example.com/public_html/cgi-bin/
All seems good until this point. The instructions say "Now you can access your AwStats by visiting the URL, "http://your-server-ip/cgi-bin/awstats.pl?config=example.com" I get a 404 error at this URL (using my server IP and site name).
Is there a better set of instructions for my server setup, or am I missing something obvious? Any help would be appreciated. Thanks!
I've installed AWStats per the instructions, and I copied the configuration file "cp /etc/awstats/awstats.conf /etc/awstats/awstats.example.com.conf"
With my server configuration, I have no "/var/www" folded. All my sites are in the "/home" directory, like "/home/example.com/public_html". So when editing "/etc/awstats/awstats.example.com.conf", I specified my logfile location properly as "/home/example.com/logs/example.com.access_log"
After the installation, the instructions say to build initial statistics using "/usr/lib/cgi-bin/awstats.pl -config=example.com -update". For me, that doesn't execute unless I put "perl" in front. Then it seems to work, because I see a newly created file awstats052024.example.com.txt in my "DirData" location "/var/lib/awstats". Not sure why I have to specify "perl" but hopefully this is correct.
The instructions say to add the following symlinks
ln -sf /usr/lib/cgi-bin /var/www/html/cgi-bin
ln -sf /usr/share/awstats/icon/* /var/www/html/awstats-icon
Because of my server configuration, I changed these to the following. Note, the second one didn't work until I manually created the /home/example.com/public_html/awstats-icon folder
ln -sf /usr/lib/cgi-bin /home/example.com/public_html/cgi-bin
ln -sf /usr/share/awstats/icon/* /home/example.com/public_html/awstats-icon
Then the instructions say to create a CGI context on the Web Admin using the following
URI=/cgi-bin/
Path=/var/www/html/cgi-bin
As before, I changed this to match my server configuration. Note I added a trailing "/" after "/home/example.com/public_html/cgi-bin" per the instructions on the context page of the Web Admin. After saving this I did a graceful restart.
URI=/cgi-bin/
Path=/home/example.com/public_html/cgi-bin/
All seems good until this point. The instructions say "Now you can access your AwStats by visiting the URL, "http://your-server-ip/cgi-bin/awstats.pl?config=example.com" I get a 404 error at this URL (using my server IP and site name).
Is there a better set of instructions for my server setup, or am I missing something obvious? Any help would be appreciated. Thanks!