Converting pbxadmin to Database Authentication

Apache Configuration Changes

Access the container via the command line, navigate to /etc/httpd/conf and edit the httpd.conf file. Search for <Directory "/var/www/webgui/pbxadmin/"> and either comment out or delete all lines within the directive except for the following:

Options Indexes FollowSymLinks
order allow,deny
allow from all

Save and exit the file.


File Changes Within the pbxadmin Directory

/var/www/webgui/pbxadmin/index.html

Search for

src="/pbxadmin/phpsysinfo/"

Change it to

src="/pbxadmin/admin/"

/var/www/webgui/pbxadmin/ringfree.php

Delete the following section:

<?php
 if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Realm"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'ERROR CCT-001: Authentication failed.';
    exit;
 } else {
    $orchiduser=$_SERVER['PHP_AUTH_USER'];
    $orchidpass=$_SERVER['PHP_AUTH_PW'];
}
?>

Then remove the only instance of the following string:

<a href="phpsysinfo/" target="body"><img border="0" src="images/classiccitytelco_system.png"></a>

/var/www/webgui/pbxadmin/phpsysinfo

Completely remove the directory.


/var/www/webgui/pbxadmin/editor

Completely remove the directory.


Update the Authentication Type in the Asterisk Database

Access the Asterisk database for the PBX in question and run the following:

UPDATE freepbx_settings SET value='database' WHERE keyword='AUTHTYPE';

Update the Authentication Type in the Papal Database

Access the Papal database and run the following:

UPDATE pbx SET authtype='database' WHERE ctid=<<<CTID>>>;

Note that “<<<CTID>>>” should be replaced with the actual container ID for the PBX.


Restart Apache in the Container

Back in the PBX container run the following:

service httpd restart

Everything should be good to go at this point.