The BatCave uses a web server in combination with PHP to display the Alfred data. It is assumed that you already have a web server set up and PHP is installed. In addition, the GD Graphics Library is required for some Metrics graphics displays.
$alfdata->database="alfsqldatabase";
$alfdata->server="alfsqlserver";
$alfdata->user="alfsqluser";
$alfdata->password="";
Please note that the values above are the default values. Edit these to match the database, database server, and user that were previously set up (see Setting up the SQL databases).
$templates-->database="alfsqldatabase";
$templates-->server="alfsqlserver";
$templates-->user="alfsqluser";
$templates-->password="";
Again, the values above are the default values and should be edited to match your database, database server, and user.
The edits made above to the global.php file can be put in a file called global_overides.php in the same directory. There are a couple of benefits to using this approach, rather than editing the global.php file:
The Batcave now supports either MySQL or PostgreSQL database servers. The global.php file needs to be edited to support the appropriate server type.
There are two areas of the BatCave that you might want to protect from unauthorized access. These areas are contained in separate subdirectories in the BatCave PHP files. Although not required, setting up password-protected access to these directories is suggested.
If you are using an Apache Web Server, you can add the commands below to the httpd.conf file to set up secured access to these directories.
<Directory "/var/www/html/batcave/admin">
AuthType Basic
AuthName "BatCave Admin"
AuthUserFile /usr/local/lib/webpasswd/batcave
Require user batcave_admin
</Directory>
<Directory "/var/www/html/batcave/control">
AuthType Basic
AuthName "BatCave Control"
AuthUserFile /usr/local/lib/webpasswd/batcave
Require user batcave_control
</Directory>
In this particular example, the BatCave PHP files are located in /var/www/html/batcave. The admin subdirectory requires a login authorization as the user batcave_admin. The password for this user is located in the file /usr/local/lib/webpasswd/batcave.
In a similar manner, the control subdirectories require a login authorization as the user batcave_control; the password is located in the same password file, which is created with the Apache program htpasswd. More information on configuring authorization for an Apache web server can be found at http://httpd.apache.org/docs/mod/mod_auth.html.
Note: If your site uses a different web server, such as IIS on Windows, please consult the appropriate documentation for securing these directories.
|
Pixar Animation Studios
|