Common problems and their solutions
HTTP Error 404
Apache, LiteSpeed, or OpenLiteSpeed
If you are using Apache, LiteSpeed, or OpenLiteSpeed and you are receiving a HTTP 404 error when trying to access portions of FOSSBilling, please check the following troubleshooting steps:
- Ensure that you have
mod_rewrite
installed and enabled. - Verify there is a valid
.htaccess
file in the same directory as the FOSSBillingindex.php
file. - If you do have a valid
.htaccess
file, verify that it matches the default FOSSBilling one (opens in a new tab) - For those of you who are using OpenLiteSpeed, you will need to restart the OpenLiteSpeed service or the webserver before the new
.htaccess
file will be loaded & take effect. - If you've checked all of the above, restart your webserver. Some configuration changes aren't applied until services are reloaded and restarting the server will ensure everything has had a chance to reload.
Apache
- Ensure that you have
AllowOverride All
enabled.- Check this post (opens in a new tab) on Stack Overflow for info on how to enable it.
Cloudflare specific issues
Some Cloudflare features can cause issues within FOSSBilling, here is a list of features and any known issues they cause
Auto Minify
- Enabling the "Auto Minify" feature with Cloudflare can cause issues within the admin panel, specifically related to file integrity checks. This will cause JS and CSS files to no longer be loaded inside your web browser and for the administrator panel to be unusable. If this issue is effecting you, your browser should display an error like this:
None of the “sha384” hashes in the integrity attribute match the content of the subresource.
- The solution for this issue is to simply disable the "Auto Minify" feature.
Permission issues
If you're receiving errors related to creating the config.php
file, or the cache folder, these troubleshooting steps may help.
File and folder permissions
- If you are using a control panel with a "fix permissions" button, first try that
- Verify files and folders for your website have the correct permissions applied. Usually
755
is correct.
File ownership
If the wrong owner is assigned to the files, then even with the correct file permissions assigned (755
), things will still not work correctly. You can check the correct own using the following steps:
- Create a new PHP file and place the following contents inside of it:
<?php var_dump(get_current_user());?>
- Open the PHP file in your web-browser. This should output the user that is used to execute PHP, which you can then use to fix the user / group permissions for your website.
RHEL Linux (and derivatives)
Those of you who are using a RHEL derived Linux distribution (RHEL, CentOS, Rocky Linux, AlmaLinux), you may find that FOSSBilling is unable to create files regardless of the file/folder permissions. Please try the following solutions:
- Configure SELinux to allow PHP (Recommended)
- Ensure you have the
policycoreutils-python
package installed. - Set the proper context for the document root
a. Note: Please check the paths in the below code snippets before executing them. Your actual paths may differ.
b.
semanage fcontext -a -t httpd_sys_content_t '/var/www/html(/.*)?'
c.restorecon -Rv /var/www/html
- Configure SELinux rules.
a.
setsebool -P httpd_can_network_connect on
b.setsebool -P httpd_can_sendmail on
c. Install theselinux-policy-devel
package d.setsebool -P httpd_can_network_connect_db on
- Restart the server
- Ensure you have the
- Disable SELinux (Discouraged)
- Edit
/etc/selinux/config
- Change
SELINUX=enforcing
toSELINUX=disabled
and save the file - Reboot the server
- Edit