Difference between revisions of "How to set up Sql-Ledger to serve from AOLserver"

From AOLserver Wiki
Jump to navigation Jump to search
Line 13: Line 13:
 
* Download and build the AOLserver [[nscgi]] module.  Usually [[nscgi]] is already included with the AOLserver distribution.
 
* 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 [http://openacs.org/doc/openacs-5-1/aolserver4.html AOLserver install docs for OpenACS 5.1].
+
You can see examples of how to build AOLserver modules by reading the [http://openacs.org/doc/openacs-5-2/aolserver4.html AOLserver install docs for OpenACS 5.2].
  
 
In the OpenACS config.tcl file, activate the [[nscgi]] module in this section:
 
In the OpenACS config.tcl file, activate the [[nscgi]] module in this section:
Line 20: Line 20:
 
  ns_param  nscgi              ${bindir}/nscgi.so
 
  ns_param  nscgi              ${bindir}/nscgi.so
  
And modify the nscgi module configuration in config.tcl. Jon Griffin has some advice about doing this with security in mind http://jongriffin.com/static/consultant/nscgi  Include something like the following. Note that this section needs updating based on GJ's suggestions:
+
And modify the nscgi module configuration in config.tcl to something like this:
  
 
  ns_section "ns/server/${server}/module/nscgi"
 
  ns_section "ns/server/${server}/module/nscgi"
 
  ns_param  map "GET  /sql-ledger /usr/local/sql-ledger"
 
  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 /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_param  Interps CGIinterps
 
   
 
   
Line 30: Line 37:
 
  ns_param  .pl "/usr/bin/perl"
 
  ns_param  .pl "/usr/bin/perl"
  
Do *not* put the SQL-Ledger directory in the AOLserver's pageroot directory. Put it in the /usr/local directory per SL docs:
+
Security Discussion
 +
 
 +
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/.
 
  mv sql-ledger /usr/local/.

Revision as of 23:07, 5 February 2006

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"
  1. ns_param map "POST /sql-ledger/css /usr/local/sql-ledger/css"
  2. 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 Discussion

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.