How to enable FOSSology to run in SELinux

If you install FOSSology in an SELinux environment, you will need to change the default configuration to allow FOSSology to communicate with the PostgreSQL database. If you see this error message when you try to browse to the FOSSology home page:

   Could not connect to FOSSology database.
   #0  debugbacktrace() called at [/usr/share/fossology/www/common/common-db.php:59]
   #1  DBconnect() called at [/usr/share/fossology/www/index.php:44

it may mean that you need to run this command (as root) to enable web connections:

setsebool -P httpd_can_network_connect_db on

Or you can put selinux in permissive mode with:

echo 0 >/selinux/enforce

which will log quite a few system warnings (typically in /var/log/messages).

For additional information on configuring apache to run in a SELinux environment, please see