Forum OpenACS Q&A: Response to Running OpenACS & ACS on same machine
Posted by
Mike Slack
on 09/27/00 04:19 AM
Here is the other config file:
#
# nsd.tcl
# Parameters for Aolserver/ACS & OpenACS
# Mike Slack (mike@slacking.org)
#
# This file should not need editing, but should be called from "service_name.tcl"
if { [string equal $database_type "ora8"] } {
set service_database_datasource ""
set database_driver "${aol_home}/bin/ora8.so"
} elseif { [string equal $database_type "postgres"] } {
set service_database_datasource "localhost:5432:${service_short_name}"
set database_driver "${aol_home}/bin/postgres.so"
}
# Starting
ns_log notice "nsd.tcl: starting to read config file..."
#
# Should not need to edit (much) below here for different services
#
# General parameters
ns_section "ns/parameters"
ns_param User "nsadmin"
ns_param ServerLog "${aol_home}/log/${service_short_name}-error.log"
ns_param Home "$aol_home"
ns_param StackSize "500000"
if { $use_acs == 1 } {
ns_param auxconfigdir "${acs_home}/parameters"
}
ns_param MaxKeepAlive "0"
ns_section "ns/threads"
ns_param SystemScope "On"
ns_section "ns/server/${service_short_name}"
ns_param PageRoot "${acs_home}/www"
ns_param DirectoryFile "index.adp,index.tcl,index.html,index.htm"
ns_param Webmaster "$service_email"
ns_param NoticeBgColor "#ffffff"
if { $use_tcl == 1 } {
ns_param EnableTclPages "On"
}
ns_param NotFoundResponse "/global/file-not-found.html"
ns_param ServerBusyResponse "/global/busy.html"
ns_param ServerInternalErrorResponse "/global/error.html"
ns_param MaxThreads "50"
ns_param MaxBusyThreads "20"
ns_param MaxWait "2"
ns_section "ns/server/${service_short_name}/adp"
ns_param Map "/*.adp"
# Database parameters
if { ![string equal $database_type "none"] } {
ns_section "ns/db/drivers"
ns_param "$database_type" "$database_driver"
ns_section "ns/db/pools"
ns_param main "main"
ns_param subquery "subquery"
ns_param log "log"
ns_section "ns/db/pool/main"
ns_param MaxIdle "1000000000"
ns_param MaxOpen "1000000000"
ns_param Driver "$database_type"
ns_param Connections "4"
ns_param DataSource "$service_database_datasource"
ns_param User "$service_database_username"
ns_param Password "$service_database_password"
ns_param Verbose "On"
ns_param ExtendedTableInfo "On"
ns_section "ns/db/pool/subquery"
ns_param MaxIdle "1000000000"
ns_param MaxOpen "1000000000"
ns_param Driver "$database_type"
ns_param Connections "4"
ns_param DataSource "$service_database_datasource"
ns_param User "$service_database_username"
ns_param Password "$service_database_password"
ns_param Verbose "On"
ns_param ExtendedTableInfo "On"
ns_section "ns/db/pool/log"
ns_param MaxIdle "1000000000"
ns_param MaxOpen "1000000000"
ns_param Driver "$database_type"
ns_param Connections "3"
ns_param DataSource "$service_database_datasource"
ns_param User "$service_database_username"
ns_param Password "$service_database_password"
ns_param Verbose "On"
ns_param ExtendedTableInfo "On"
ns_section "ns/server/${service_short_name}/db"
ns_param Pools "main,subquery,log"
ns_param DefaultPool "main"
}
# Module parameters
ns_section "ns/server/${service_short_name}/module/nslog"
ns_param EnableHostnameLookup "Off"
ns_param File "${aol_home}/log/${service_short_name}.log"
ns_param LogCombined "On"
ns_param LogRefer "Off"
ns_param LogUserAgent "Off"
ns_param MaxBackup "5"
ns_param RollDay "*"
ns_param RollFmt "%Y-%m-%d-%H:%M"
ns_param RollHour "0"
ns_param RollOnSignal "On"
ns_param RollLog "On"
ns_section "ns/server/${service_short_name}/module/nsperm"
ns_param Model "Small"
ns_param EnableHostnameLookup "Off"
ns_section "ns/server/${service_short_name}/module/nssock"
ns_param timeout "120"
ns_param Address "${service_ip_address}"
ns_param Hostname "${service_ip_name}"
ns_param Port "${service_port}"
if { $use_ssl == 1 } {
ns_section "ns/server/${service_short_name}/module/nsssl"
ns_param Address "${service_ip_address_ssl}"
ns_param Hostname "${service_ip_name_ssl}"
ns_param CertFile "${aol_home}/servers/${service_short_name}/cert.pem"
ns_param KeyFile "${aol_home}/servers/${service_short_name}/key.pem"
ns_param Port "${service_port_ssl}"
}
if { $use_cgi == 1 } {
ns_section "ns/server/${service_short_name}/module/nscgi"
ns_param Map "GET /cgi-bin ${acs_home}/cgi-bin"
ns_param Map "POST /cgi-bin ${acs_home}/cgi-bin"
ns_param Interps "CGIinterps"
ns_section "ns/interps/CGIinterps"
ns_param ".cgi" "/usr/bin/perl"
}
if { $use_java == 1 } {
ns_section "ns/server/${service_short_name}/module/nsjava"
ns_param EnableJava "On"
ns_param VerboseJvm "Off"
ns_param LogLevel "Notice"
ns_param DestroyJvm "Off"
ns_param DisableJITCompiler "Off"
# This probably needs fixing if you're using java
ns_param ClassPath "/usr/local/jdk/jdk118_v1/lib/classes.zip:/usr/local/aolserver/bin/nsjava.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java/activation.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java/mail.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java"
}
ns_section "ns/server/${service_short_name}/modules"
ns_param nsperm "${aol_home}/bin/nsperm.so"
ns_param nssock "${aol_home}/bin/nssock.so"
ns_param nslog "${aol_home}/bin/nslog.so"
if { $use_ssl == 1 } {
ns_param nsssl "${aol_home}/bin/nsssle.so"
}
if { $use_cgi == 1 } {
ns_param nscgi "${aol_home}/bin/nscgi.so"
}
if { $use_java == 1 } {
ns_param nsjava "${aol_home}/bin/libnsjava.so"
}
# Other misc parameters
ns_section "ns/server/${service_short_name}/MimeTypes"
ns_param Default "text/plain"
ns_param NoExtension "text/plain"
ns_param ".pcd" "image/x-photo-cd"
ns_param ".prc" "application/x-pilot"
ns_param ".xls" "application/vnd.ms-excel"
ns_section "ns/server/${service_short_name}/tcl"
if { $use_tcl == 1 } {
ns_param Library "${acs_home}/tcl"
}
ns_section "ns/servers"
ns_param "$service_short_name" "${service_short_description}"
# Load ACS parameters (if you use a *.ini instead of a *.tcl config file,
# you'll need to change ".tcl" to ".ini" below)
if { $use_acs == 1 } {
source "${acs_home}/parameters/${service_short_name}.tcl"
}
# Done
ns_log notice "nsd.tcl: finished reading config file."