• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

500 Internal server error on /plesk-stat

K

kcackler

Guest
I'm getting a 500 internal server error when I visit mydomain/plesk-stat (or mydomain/webstat, etc...)

The error log isn't showing anything and I'm just at a loss. Everything was recently updated (apache, PHP, MySQL, Plesk) so I'm sure that has something to do with it, but so far I've been unable to track down the cause..

Any ideas would be appreciated.
Kevin
 
is there anything in the error log of the domain?
Check the log /var/www/vhosts/domain.com/statistics/logs/error_log
 
Nope - All error logs are completely empty of any info regarding this problem.

Kevin
 
try to check if there are any errors in /var/log/httpd/error_log. Also, if there are any custom configuration for this domain in vhost.conf file, try to disable it, restart apache and check how it works without it.
 
That's the thing - None of the error logs are showing anything. I've checked them all.

Also, it's not just broken on one domain - It's broken on all domains using plesk stats. I'm sure it has something to do with the upgrades I recently performed, as it worked great before those.
 
If you recently upgraded apache make sure that the suexec rpm was installed, and that you did not replace the psa provided suexec with the one that came with httpd-suexec

I had that problem once and the suexec was the cause, it caused perl and php files to give 500 errors, and some times just blank pages.

if you did, its easy to fix
Code:
chattr -i /usr/sbin/suexec
cp --reply=y /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
chown root:apache /usr/sbin/suexec
chmod 4510 /usr/sbin/suexec
 
Nope - Also not the cause. Regular perl/cgi scripts are running fine. Some very complicated PHP scripts are running just fine. But the stats are just not working. For safety, I went ahead and tried what you wrote above, to no avail.....

Kevin
 
Not exactly sure how to run it from the CLI to be honest.

Kevin
 
something like /var/www/cgi-bin/awstats/awstats.pl -config=domain.com I think is how to run it
 
./awstats.pl -config=thatscriptguy.com
Error: Couldn't open config file "awstats.thatscriptguy.com.conf" nor "awstats.c onf" after searching in path ".,/etc/awstats,/usr/local/etc/awstats,/etc,/etc/op t/awstats": No such file or directory

- Did you use correct config parameter ?
Example: If your config file is awstats.mysite.conf, use -config=mysite
- Did you create your config file 'awstats.thatscriptguy.com.conf' ?
If not, you can run "awstats_configure.pl"
from command line, or create it manually.

Check config file, permissions and AWStats documentation (in 'docs' directory).


The directory listing of /var/www/awstats looks like this:

awredir.pl awstats092007.localhost.localdomain.txt awstats112007.localhost.localdomain.txt css lib
awstats.pl awstats102007.localhost.localdomain.bak awstats122007.localhost.localdomain.bak icon plugins
awstats082007.localhost.localdomain.txt awstats102007.localhost.localdomain.txt awstats122007.localhost.localdomain.txt js
awstats092007.localhost.localdomain.bak awstats112007.localhost.localdomain.bak classes lang


Any ideas?

Kevin
 
OK - In the configuration file, it referred to awstats in several places....

AWSTATS_ETC_D /etc/awstats
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /var/www/html/awstats

AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin



/etc/awstats is correct

/usr/share/awstats/tools doesn't exist at all

I changed /var/www/html/awstats to /var/www/awstats

/usr/share/awstats/wwwroot/cgi-bin again doesn't exist (/usr/share/awstats doesn't exist at all)



I did a find -name 'awstats' on the machine, and it only came up with 3 locations


./etc/awstats
./usr/local/psa/etc/awstats
./var/www/awstats


Still have no idea what's going on here.....
 
here is what mine is - I have a RHEL4 i386 box

#grep -i awstats /etc/psa/psa.conf
AWSTATS_ETC_D /etc/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats
AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin

# find / -name 'awstats'
/var/www/cgi-bin/awstats
/var/www/html/awstats
/var/lib/awstats
/etc/awstats
/etc/cron.daily/awstats
/usr/share/awstats
/usr/local/psa/etc/awstats

You may need to re-install the RPM pacakge.
 
Yep - It looks like it.

Let me do some tinkering today on this.
Thanks for your help :)

Kevin
 
Actually im not sure how but mine got broken as well.
It had the wrong paths set.

Mine is set to
# AWStats
AWSTATS_ETC_D /etc/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats

Then I re-run stats
/usr/local/psa/admin/sbin/statistics --calculate-all
 
Sooo...Any idea how to re-install the statistics package as built for plesk? Installing the regular awstats package resulted in an installation that technically worked, but was not working as originally intended (updated with plesk updates, etc...)

Kevin
 
Back
Top