Installing Webmin in FreeBSB
Webmin and Usermin are available from the FreeBSD Ports Collection. Webmin can be installed from the /ports/sysutils/webmin/ directory, and Usermin from /ports/sysutils/usermin/.
SSH to your server and su to root.
Use the cd command to change to the port directory for Webmin:
# cd /ports/sysutils/webmin
Run the following command to install Webmin:
During the install process, you will be prompted for various information.
Use the defaults (hit Enter when prompted) for the Config File directory, Log file directory, Full path to Perl, and Web server port.
Select an administrative user Login name. You may want to use the same name as your server administrator account, or use the default admin username.
Enter a password for the administrative user. Make sure the password is something you can remember. You will be prompted to re-enter the password to confirm you spelled it correctly. When entering the passwords, you will not see anything echoed on the screen.
Select NO when asked if you want to use SSL. Once Webmin is installed and running, you will have the option to configure SSL support from the Webmin control panel.
It may take several minutes (depending on server load) for Webmin to finish the installation. Once the installation has completed, you will need to start Webmin using the following command:
# /usr/local/etc/webmin/start
Update awstats in Plesk Manually
To update stats manually for a domain, you can run the following command. Replace the “domain.com” with the domain name.
$ /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domain.com
To generate stats for all the domains in the server, use the following command.
$ /usr/local/psa/admin/sbin/statistics
If you receive any error, please make sure that the binaries are present in the path specified in the configuration file ‘/etc/psa/psa.conf’
$ grep AWSTAT /etc/psa/psa.conf
will return the path
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats
Make sure that the following files are present in the correct location.
awstats_buildstaticpages.pl: /usr/share/awstats/awstats_buildstaticpages.pl
awstats.pl: /var/www/cgi-bin/awstats/awstats.pl
Permission denied error, while executing Nagios binaries
Nagios provides enterprise-class Open Source monitoring of hosts and services.
Make sure that the Nagios user has correct ownership/permissions to Nagios files in the Nagios installation directory.
Check if SElinux is enabled. If it is enabled, the Nagios binaries won’t be executed.
There are 3 alternative solutions for this.
1) Disable SElinux, SELINUX=disable.
2) Make it execute non-built-in services like Nagios by setting, SELINUX=permissive. This would cause the binaries to execute with only warnings logged to /var/log/messages.
If you go for the fix 1 or 2, you would need to reboot the server once.
3) You can change the security context of the Nagios binaries and make them executable with SElinux enabled.
chcon -t sbin_t /usr/local/nagios/sbin
chcon -R -t sbin_t /usr/local/nagios/sbin/
Update awstats in Plesk Manually
To update stats manually for a domain, you can run the following command. Replace the “domain.com” with the domain name.
$ /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domain.com
To generate stats for all the domains in the server, use the following command.
$ /usr/local/psa/admin/sbin/statistics
If you receive any error, please make sure that the binaries are present in the path specified in the configuration file ‘/etc/psa/psa.conf’
$ grep AWSTAT /etc/psa/psa.conf
will return the path
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats
Make sure that the following files are present in the correct location.
awstats_buildstaticpages.pl: /usr/share/awstats/awstats_buildstaticpages.pl
awstats.pl: /var/www/cgi-bin/awstats/awstats.pl
Unable login into the domain stats
Issue: Unable to login into the stats of the domain (in Plesk). It is asking the password continuously.
Search for the following entry in /var/www/vhosts/domainName/conf/httpd.include:
(The file /var/www/vhosts/domainName/conf/httpd.include is actually HTTPD_VHOSTS_D/domainName/conf/httpd.include):
<Directory "/var/www/vhosts/domainName/statistics">
AuthType Basic
AuthName "Domain statistics"
AuthUserFile /var/www/vhosts/domainName/pd/d..httpdocs@plesk-stat
require valid-user
</Directory>
It is in that AuthUserFile, the login name as well as the encrypted password is stored.
So adding a new user login details in that file fix the problem, and you can add it as follows.
Create the encrypted password using htpasswd command.
htpasswd -bd /var/www/vhosts/domainName/pd/d..httpdocs@plesk-stat
This will fix the issue.
Note : Replace the domainName by corresponding domain name.