Trouble with AWStats install

#1
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!
 
#3
@Cold-Egg here it is, thanks!

Code:
drwxrwx---+ 22     up4743     nogroup  4096     May 14 12:08  .
drwxrwx--x+ 13     up4743     up4743   4096     May 14 14:14  ..
drwxr-xr-x   2     root       root     4096     May 13 21:36  awstats-icon
drwxrwxr-x+  3     up4743     up4743   4096     May 14 12:30  cgi-bin
drwxrwxr-x+  2     up4743     up4743   4096     Feb 25 19:37  css
-rw-rwxr--+  1     up4743     up4743    723     Mar  9 14:44  favicon_16x16.png
-rw-rwxr--+  1     up4743     up4743   1323     Mar  9 14:44  favicon_32x32.png
-rw-rwxr--+  1     up4743     up4743   3848     Mar  9 14:44  favicon_96x96.png
drwxrwxr-x+  2     up4743     up4743   4096     Feb 25 19:37  fonts
-rw-rwxr--+  1     up4743     up4743   3287     Mar  9 14:44  .htaccess
drwxrwxr-x+  5     up4743     up4743   4096     Feb 25 19:37  images
drwxrwxr-x+  3     up4743     up4743   4096     Feb 25 19:38  includes
-rw-rwxr--+  1     up4743     up4743  67844     Mar  9 14:44  index.php
drwxrwxr-x+  2     up4743     up4743   4096     Feb 25 19:38  js
-rw-rwxr--+  1     up4743     up4743    656     Mar  9 14:44  php.ini
-rw-rwxr--+  1     up4743     up4743    252     Mar  9 14:44  robots.txt
-rw-rwxr--+  1     up4743     up4743   7873     Mar  9 14:44  touch-icon-iphone-retina.png
 

Cold-Egg

Administrator
#4
Thanks, I don't see any symbolic links(the ln command should generate a link for it). Like this
Code:
cgi-bin -> /usr/lib/cgi-bin
 
#5
Thank you. The "ln" commands are creating the links inside the target folders. For example,

Code:
ln -sf /usr/lib/cgi-bin /home/example.com/public_html/cgi-bin

here's where I can find the link

Code:
ls -al /home/example.com/public_html/cgi-bin

lrwxrwxrwx 1 root root 16 May 16 11:58 cgi-bin -> /usr/lib/cgi-bin

Same with the icons

Code:
ln -sf /usr/share/awstats/icon/* /home/example.com/public_html/awstats-icon
Code:
ls -al /home/example.com/public_html/awstats-icon

lrwxrwxrwx 1 root root 31 May 16 12:19 browser -> /usr/share/awstats/icon/browser
lrwxrwxrwx 1 root root 29 May 16 12:19 clock -> /usr/share/awstats/icon/clock
lrwxrwxrwx 1 root root 27 May 16 12:19 cpu -> /usr/share/awstats/icon/cpu
lrwxrwxrwx 1 root root 29 May 16 12:19 flags -> /usr/share/awstats/icon/flags
lrwxrwxrwx 1 root root 28 May 16 12:19 mime -> /usr/share/awstats/icon/mime
lrwxrwxrwx 1 root root 26 May 16 12:19 os -> /usr/share/awstats/icon/os
lrwxrwxrwx 1 root root 29 May 16 12:19 other -> /usr/share/awstats/icon/other

Maybe I'm using the "ln" commands incorrectly? Thanks!
 
Top