Webdb.Html
Enabling the Web SQL Editor
From here forward several steps will require you to add data to the testbed database by hand. If you're comfortable with SQL, you can do this directly with SQL queries. If not, you can use the generic web-based SQL table editor provided with the testbed software. If you plan to use the former method, you can skip this page.
Warning:
Many tables depend on data in other tables, or depend on running programs to effect a change. Therefore, you should not edit tables other than the ones described in this chapter. You have been warned...
First, you'll want to protect the webdb script from outside browsers. Because of
its flexibility, it would be quite dangerous if it were broken into. So, we
add an additional layer of protection by limiting the IP addresses that may
access it. Open your httpd.conf
file (located in
/usr/local/etc/apache
) and find the 'Directory' directives.
Add a section such as this:
<Directory /usr/testbed/www/webdb> AllowOverride None order deny,allow deny from all allow from 155.99.212. </Directory>
If you installed the testbed tree somewhere other than /usr/testbed
,
fix the directory. Change the 'allow from' line to match your IP subnet (note
the '.' on the end of the addresses, to match the entire subnet). You can have
as many 'allow' lines as you want. Now restart the apache webserver:
sudo /usr/local/etc/rc.d/apache.sh stop sudo /usr/local/etc/rc.d/apache.sh start
Next, you'll need to specify which users have the ability to edit the database. This is done with the 'dbedit' column in the users table. You can turn on a user's dbedit bit like so:
echo 'update users set dbedit=1 where uid="<username>"' | mysql tbdb