How to set up Sql-Ledger to serve from AOLserver

From AOLserver Wiki
Revision as of 23:15, 5 February 2006 by 24.20.69.247 (talk)
Jump to navigation Jump to search

Install SQL-Ledger with the following modifications:

Note that I'm using this on an isolated LAN so have not done any testing to verify the integrity of SQL-Ledger security on it.

Be sure AOLserver is installed, and shutdown.

We adapt the instructions for setting setting up httpd (aolserver's nsd in this case):

  • Download and build the AOLserver nscgi module. Usually nscgi is already included with the AOLserver distribution.

You can see examples of how to build AOLserver modules by reading the AOLserver install docs for OpenACS 5.2.

In the OpenACS config.tcl file, activate the nscgi module in this section:

ns_section ns/server/${server}/modules 
ns_param   nscgi              ${bindir}/nscgi.so

And modify the nscgi module configuration in config.tcl to something like this:

ns_section "ns/server/${server}/module/nscgi"
ns_param   map "GET  /sql-ledger /usr/local/sql-ledger"
ns_param   map "GET  /sql-ledger/bin/mozilla /usr/local/sql-ledger/bin/mozilla"
ns_param   map "GET  /sql-ledger/css /usr/local/sql-ledger/css"
ns_param   map "POST /sql-ledger /usr/local/sql-ledger"
ns_param   map "POST /sql-ledger/bin/mozilla /usr/local/sql-ledger/bin/mozilla"
# ns_param   map "POST /sql-ledger/css /usr/local/sql-ledger/css"
# there is no need to post to css files ;)
ns_param   Interps CGIinterps

ns_section "ns/interps/CGIinterps"
ns_param   .pl "/usr/bin/perl"

Security: Jon Griffin has some advice about nscgi and security at http://jongriffin.com/static/consultant/nscgi For greater security, map each .pl file individually that is in those directories.

Do *not* put the SQL-Ledger directory in the AOLserver's pageroot directory. Put sql-ledger dir in the /usr/local directory per SL docs:

mv sql-ledger /usr/local/.
# set permissions to match the rest of the aolserver files, for example:
cd /usr/local/
chown -R nsadmin:web sql-ledger
chmod -R 770 sql-ledger 
cd /usr/local/sql-ledger
chmod 644 *.gif
chmod 644 *.png
chmod 644 *.ico
cd css
chmod 664 *.css

Follow the SL directions to create a SQL-Ledger database and user for PostgreSQL, and proceed with the configuration in the SL README. Hopefully you see a login page at http://yourservername:port/sql-ledger/admin.pl and are able to follow standard SQL-Ledger configuration directions.