WHMCS

Installation

Den aktuellsten Full Release herunterladen und nach /var/www/html/$DOMAIN entpacken.

DOMAIN=whmcs.example.com

mkdir -p /var/www/html/$DOMAIN
cd /var/www/html/$DOMAIN
unzip /tmp/whmcs_v861_full.zip
mv whmcs/* .
rmdir whmcs/

mv /var/www/html/$DOMAIN/configuration.php.new /var/www/html/$DOMAIN/configuration.php
mkdir -p /data/whmcs
mv /var/www/html/$DOMAIN/crons /data/whmcs/
mkdir /var/www/html/$DOMAIN/vendor/whmcs/whmcs
mkdir /data/whmcs/updates
mv /data/whmcs/crons/config.php.new /data/whmcs/crons/config.php
chmod 644 /var/www/html/$DOMAIN/configuration.php
chown -R apache:apache /var/www/html/$DOMAIN
restorecon -Fvr /var/www/html/$DOMAIN/
restorecon -Fvr /data/whmcs

http://$DOMAIN/whmcs/install/install.php im Browser öffnen und dem Setup folgen.

Nach der Installation die Härtung durchführen (siehe https://docs.whmcs.com/Further_Security_Steps):

DOMAIN=whmcs.example.com

chmod 444 /var/www/html/$DOMAIN/configuration.php
rm -rf /var/www/html/$DOMAIN/install
crontab -e
# folgendes hinzufügen: */5 *  * * * /usr/bin/php -q /data/whmcs/crons/cron.php

mv /var/www/html/$DOMAIN/templates_c /data/whmcs/
chmod 777 /data/whmcs/templates_c

mv /var/www/html/$DOMAIN/downloads /data/whmcs/
chmod 755 /data/whmcs/downloads

mv /var/www/html/$DOMAIN/attachments /data/whmcs/
mkdir /data/whmcs/attachments/projects
chmod 755 /data/whmcs/attachments
chmod 755 /data/whmcs/attachments/projects

mv /var/www/html/$DOMAIN/admin /var/www/html/$DOMAIN/whmcs-admin
/var/www/html/$DOMAIN/configuration.php
<?php
$license = 'WHMCS-...';
$db_host = '127.0.0.1';
$db_port = '';
$db_username = 'whmcs';
$db_password = 'linuxfabrik';
$db_name = 'whmcs';
$templates_compiledir = '/data/whmcs/templates_c';
$mysql_charset = 'utf8';
$crons_dir = '/data/whmcs/crons/';
$customadminpath = "whmcs-admin";
/data/whmcs/crons/config.php
<?php
$whmcspath = '/var/www/html/$DOMAIN/';
DOMAIN=whmcs.example.com

chown -R apache:apache /data/whmcs
restorecon -Fvr /data/whmcs
restorecon -Fvr /var/www/html/$DOMAIN/

systemctl restart php-fpm.service
systemctl restart httpd.service

Troubleshooting

Client IPs are wrong after changing the reverse proxy or migrating the server

Adjust the trusted proxies in System Settings > General Settings > Security: Trusted Proxies

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing

The first stage is to check the IPN history within PayPal. This will show the HTTP response code which will help to understand what is occurring. Please could you:

  1. Log in to your PayPal account

  2. Select your name at the top right

  3. Choose „Account settings“

  4. Select „Notifications“ on the left hand menu

  5. Select „Update“ next to „Instant Payment Notifications“

  6. Click „IPN History page“

  7. Click the Message ID of a failed notification

  8. Provide a screenshot of that page

If the following result is logged in the „Billing > Gateway“ Log in relation to these payments: „IPN Handshake Invalid“, then the cause of this error is shown in this part of the debug data:

charset => windows-1252

This is to stop any false payments being applied to your account, however, on occasion, some valid payments can generate this error. Follow the instructions for setting the Charset of your IPN to utf-8 which will stop this for subsequent payments and new Subscriptions: https://docs.whmcs.com/PayPal_Basic#Charset_Configuration (so change this in PayPal)

The payments experiencing the error can be entered into WHMCS manually: https://docs.whmcs.com/Invoicing#Applying_Payment