HOW TO: Using FreePBX Back End for trixbox CE Authentication

Using FreePBX Back End for trixbox CE Authentication

Introduction

One of the cool features of FreePBX that seems to get lost when it goes in to trixbox is the ability to have multiple users. The following article explains how to make teixbox CE 2.4/2.6 use the "administrators" module of FreePBX rather than the standard .htaccess (maint/passw0rd) This obviously is not supported by Rhino, trixbox, or FreePBX and is for informational purposes only that said if you do this make backups of everything. You can not back up the trixbox.conf into the same directory or apache will look at both files. Before doing this go in to FreePBX and make sure you know the username and password, default is admin/admin.

Information

1. Install apache's MySQL auth module:
yum install mod_auth_mysql

2. set authtype=webserver in your amportal.conf
nano -w /etc/amportal.conf

3. Replace the contents of /etc/trixbox/httpdconf/trixbox.conf
nano -w /etc/trixbox/httpdconf/trixbox.conf

Your file should look like this:

<directory>
AllowOverride AuthConfig
Options Indexes FollowSymLinks
order allow,deny
allow from all
AuthType Basic
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthMySQLEnable                 On
AuthMySQLHost                   localhost
AuthMySQLDB                     asterisk
AuthMySQLUserTable              ampusers
AuthMySQLUser                   asteriskuser
AuthMySQLPassword               amp109
AuthMySQLNameField              username
AuthMySQLPasswordField          password
AuthMySQLAuthoritative          On
AuthMySQLPwEncryption           none
Require valid-user
</directory>

<directory>
AllowOverride AuthConfig
Options Indexes FollowSymLinks
order allow,deny
allow from all
AuthType Basic
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthMySQLEnable                 On
AuthMySQLHost                   localhost
AuthMySQLDB                     asterisk
AuthMySQLUserTable              ampusers
AuthMySQLUser                   asteriskuser
AuthMySQLPassword               amp109
AuthMySQLNameField              username
AuthMySQLPasswordField          password
AuthMySQLAuthoritative          On
AuthMySQLPwEncryption           none
Require valid-user
</directory>

These use default mysql passwords. If you have changed these you will want to update amp109 above

4. Restart apache and FreePBX
/etc/init.d/httpd restart
amportal restart
Applies To
FreePBX
trixbox CE 2.4
trixbox CE 2.6
Keywords
trixbox CE, FreePBX, Authentication

Author James Finstrom

Original posting at https://support.rhinoequipment.com