Forum OpenACS Q&A: ACS Site-Wide Administration link

Collapse
Posted by Tyge Cawthon on
I have two instances of OpenACS running on Arch Linux virtual machine. Runs very nice.

I have successfully changed the Parameters in the Site-Wide Administration => ACS Kernel to change System Information i.e. PublisherName, SystemName and SystemURL for instance one.

Problem:
When I select "Site-Wide Administration" for either instances of OpenACS (one or two), the link shows ip_address/acs-admin.

Question:
How can I change the links to use their respective OpenACS instances?
instance_one_URL/acs-admin and
instacne_two_URL/acs-admin

Thank you in advance.

BTW - If there is any interesting, I would be very happy to share the documentation on "how to" step by step procedures for setting up multiple OpenACS instances on one VM. Documentation would include working examples of config.tcl files, change System Information in the Kernel, etc.

Collapse
Posted by Iuri Sampaio on
Hello Tyge,
There're a couple of places you must go inorder toconfirm that you had reference your instances by the domina name, instead of IP addresses.
1. ACS Kernel parameter: SystemURL
1.1. Go to siteMap /admin/site-map/, and at the bottom, you might find a link named as ACS Kernel. That's the Kernel parameter's page.
1.2. Search for SystemURL. It must be close to the bottom.
1.3. Make sure it's assigned to a DNS, such as https://mysite.com

2. Naviserver configuration file. This file probably is located within /usr/local/ns/, named as myinstance-config.tcl
2.1. Open that file with you preferred text editor.
2.2. search for the parameter named as hostname and, make sure it has a DNS assigned such as mysite.com

3. Lastly but not least. Make sure you have SuppressHttpPort enabled, in case you're using a proxy in front of Naviserver;
3.1. Go to sitemap again, and scroll all the way down to the bottom .
3.2. Search for a link named as ACS Tcl Library, and click on that link
3.3. Switch to parameter's value to 1 in order to suppress HTTP Port, and avoid navigation breaks, such as mysite.com:8000, when :8000 is opened only to local connections.

Those 3 are the main location, which could cause the problem described by you. Even though, I couldn't tell if they are really the cause of it, as I'd need more context information to guarantee 100%

Let us know if that hope it helps, and/or how you solved the problem.

Best wishes,
I

Collapse
Posted by Tyge Cawthon on
Luri,
Thank you for the fast response.
I had made those changes early and have confirm your recommanded changes are
in place.

Select Administraion
Select ACS Site-Wide Administration
Select ACS kernel => Parameters

Instance 1. SystemURL https://celtic-arts.org
Instance 2. SystemURL https://qa.celtic-arts.org

We are not using any proxy, but we have enable SuppressHttpPort.
Select Administraion
Select ACS Site-Wide Administration
Select ACT Tcl Library => Parameters

Both Instances. SuppressHttpPort 1

On either instance, when I hoverover "ACS Site-Wide Administration"
at the bottom of the browser or if viewing the soruce code through the browser
the link appears as https://192.168.4.214/acs-admin

Code from the browser:

  <h1>For Site-Wide Administrators</h1>
  <ul>
    <li>
    <a href="https://192.168.4.214/acs-admin/">ACS Site-Wide Administration</a>
<span style="font-style:italic;color:#666;">(Site-wide administration)</span>
    </li>
  </ul>

OpenACS code is getting the ip address from place and inserting the ip address in the code.
But where, I have no idea.

if you need more information, please let me know

Below is my config file used to start the processes.

######################################################################
#
# Naviserver and OpenACS
# one instance of naviserver and two instances of OpenACS
# on the same virtual machine
#
# Tested on 2022-02-26 OpenACS 5-10-0
# path: /etc/naviserver
# file: config-oacs-5.10.0.tcl
######################################################################

#---------------------------------------------------------------------
set address        192.168.4.214
set httpport        80
set httpsport      443

set s1_hostname        "celtic-arts.org"
set s1_server          "openacs"
set s1_serverroot      /usr/lib/$s1_server

set s2_hostname        "qa.celtic-arts.org"
set s2_server          "openacsqa"
set s2_serverroot      /usr/lib/$s2_server

set s1_navi_homedir    /usr/lib/naviserver

#---------------------------------------------------------------------
# postgresql database settings
#---------------------------------------------------------------------
set database        postgres

set s1_db_name      oacs_5_10_0_prod
set s2_db_name      oacs_5_10_0_qa

set db_host        localhost
set db_port        ""
set db_user        nsadmin

#---------------------------------------------------------------------
# Are we runnng behind a proxy?
# Openacs requires this
#---------------------------------------------------------------------
set proxy_mode      false

#---------------------------------------------------------------------
# if debug is false, all debugging will be turned off
set debug false
set dev  false

set max_file_upload_mb        200
set max_file_upload_min      5

#---------------------------------------------------------------------
# set environment variables HOME and LANG
set env(HOME) ${s1_navi_homedir}
set env(LANG) en_US.UTF-8

######################################################################
#
# End of instance-specific settings
#
# Nothing below this point need be changed in a default install.
#
######################################################################

#---------------------------------------------------------------------
#
# NaviServer's directories. Autoconfigurable.
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Global server parameters
#---------------------------------------------------------------------
ns_section ns/parameters
    ns_param    serverlog  ${s1_serverroot}/log/error.log
    ns_param    pidfile    ${s1_serverroot}/log/nsd.pid
    ns_param    home        ${s1_navi_homedir}
    ns_param    debug      $debug
    ns_param    logmaxbackup    100  ;# 10 is default
    ns_param    logdebug    $debug
    ns_param    logdev      $dev
    # Naviserver's defaults charsets are all utf-8.  Allthough the
    # default charset is utf-8, set the parameter "OutputCharset"
    # here, since otherwise OpenACS uses in the meta-tags the charset
    # from [ad_conn charset], which is taken from the db and
    # per-default ISO-8859-1.
    ns_param    OutputCharset  utf-8

    # Running behind proxy? Used by OpenACS...
    ns_param    ReverseProxyMode    $proxy_mode

#---------------------------------------------------------------------
# Thread library (nsthread) parameters
#---------------------------------------------------------------------
ns_section ns/threads
    ns_param    stacksize  [expr {128 * 8192}]

#---------------------------------------------------------------------
# Extra mime types
# NaviServer already has an exhaustive list of MIME types:
#  see: /usr/local/src/naviserver/nsd/mimetypes.c
#---------------------------------------------------------------------

#---------------------------------------------------------------------
#
# Server-level configuration
#
#  There is only one server in NaviServer, but this is helpful when multiple
#  servers share the same configuration file.  This file assumes that only
#  one server is in use so it is set at the top in the "server" Tcl variable
#  Other host-specific values are set up above as Tcl variables, too.
#
#---------------------------------------------------------------------
ns_section ns/servers
    ns_param s1 ${s1_server}
    ns_param s2 ${s2_server}

#---------------------------------------------------------------------
# modules drivers
#---------------------------------------------------------------------
ns_section ns/modules
    ns_param    nssock      ${s1_navi_homedir}/bin/nssock.so
    ns_param    nsssl      ${s1_navi_homedir}/bin/nsssl.so

#---------------------------------------------------------------------
# Socket driver module (HTTP)  -- nssock
#---------------------------------------------------------------------
ns_section ns/module/nssock
    ns_param    address        ${address}
    ns_param    port            ${httpport}  ;# 80
    ns_param    defaultserver  s1

    ns_param    maxinput    [expr {$max_file_upload_mb * 1024 * 1024}]
                            # 1024*1024, maximum size for inputs
    ns_param    recvwait    [expr {$max_file_upload_min * 60}]
                            # 30, timeout for receive operations
    #
    # Spooling Threads
    #
    ns_param    writerthreads  2  ;# 0, number of writer threads
    ns_param    writersize  4096    ;# 1024*1024, use writer threads for

#---------------------------------------------------------------------
# SSL
#---------------------------------------------------------------------
ns_section ns/module/nsssl
    ns_param    address        ${address}
    ns_param    port          ${httpsport} ;# 443
    ns_param    defaultserver  s1

    ns_param    ciphers        "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!RC4"
    ns_param    protocols      "!SSLv2"
    ns_param    certificate    ${s1_serverroot}/etc/certfile.pem
    ns_param    verify          0
    ns_param    writerthreads  2
    ns_param    writersize      4096
    ns_param    writerbufsize  16384
                                    # 8192, buffer size for writer threads
    ns_param    maxinput        [expr {$max_file_upload_mb * 1024*1024}]
                                    # Maximum File Size for uploads in bytes

#---------------------------------------------------------------------
# Define the mapping between the DNS names and the servers.
#---------------------------------------------------------------------
ns_section ns/module/nssock/servers
  #
  # Domain names for s1
  ns_param s1 ${s1_hostname}
  ns_param s2 ${s2_hostname}

#---------------------------------------------------------------------
# nsssl servers
#---------------------------------------------------------------------
ns_section ns/module/nsssl/servers
  ns_param s1 ${s1_hostname}
  ns_param s2 ${s2_hostname}

#---------------------------------------------------------------------
# Database drivers
# The database driver is specified here.
# Make sure you have the driver compiled and put it in ${s1_navi_homedir}/bin
#---------------------------------------------------------------------
ns_section "ns/db/drivers"
    ns_param    postgres      ${s1_navi_homedir}/bin/nsdbpg.so
    ns_section "ns/db/driver/postgres"
    # Set this parameter, when "psql" is not on your path (OpenACS specific)
    # ns_param  pgbin  "/usr/local/pg920/bin/"

#---------------------------------------------------------------------
# Server-level configuration
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Server s1
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# s1 Server parameters
#---------------------------------------------------------------------
ns_section ns/server/s1
    ns_param    minthreads  2
    # 1 minimal number of connection threads
    ns_param    connsperthread  1000
    # 10000; number of connections requests handled per thread
    ns_param    highwatermark  100
    # 80; allow concurrent creates above this queue-is percentage
    # 100 means to disable concurrent creates
    #
    # Compress response character data: ns_return, ADP etc.
    ns_param    compressenable  on  ;# false, use "ns_conn compress" to override

#---------------------------------------------------------------------
# HTTP redirect pages
#---------------------------------------------------------------------
ns_section ns/server/s1/redirects
    ns_param    404 "/global/file-not-found.html"
    ns_param    403 "/global/forbidden.html"
    ns_param    503 "/global/busy.html"
    ns_param    500 "/global/error.html"

#---------------------------------------------------------------------
# s1 Tcl Configuration
#---------------------------------------------------------------------
ns_section ns/server/s1/tcl
    ns_param    library    ${s1_serverroot}/tcl
    ns_param    autoclose  on
    ns_param    debug      $debug

#---------------------------------------------------------------------
# s1 fastpath
#---------------------------------------------------------------------
ns_section "ns/server/s1/fastpath"
    ns_param    serverdir  ${s1_navi_homedir}
    ns_param    pagedir    ${s1_serverroot}/www

#---------------------------------------------------------------------
# s1 Access log -- nslog
#---------------------------------------------------------------------
ns_section ns/server/s1/module/nslog
    #-----------------------------------------------------------------
    # General parameters for access.log
    #-----------------------------------------------------------------
    ns_param    file            ${s1_serverroot}/log/access.log
    # ns_param  maxbuffer      100 ;# 0, number of logfile entries to keep
                                    # in memory before flushing to disk
    #-----------------------------------------------------------------
    # Control what to log
    #-----------------------------------------------------------------
    ns_param    logpartialtimes true        ;# false, include high-res start
                                            # time and partial request
                                            # durations (accept, queue,
                                            # filter, run)
    ns_param    checkforproxy  $proxy_mode ;# false, check for proxy
                                            # header (X-Forwarded-For)
    #
    #-----------------------------------------------------------------
    # Control log file rolling
    #-----------------------------------------------------------------
    ns_param    rollfmt    %Y-%m-%d-%H:%M  ;# format appendend to log file name

#---------------------------------------------------------------------
# s1 modules
# Missing modules break the server, so
# don't uncomment modules unless they have been installed.
#---------------------------------------------------------------------
ns_section ns/server/s1/modules
#    ns_param    nssock      ${s1_navi_homedir}/bin/nssock.so
    ns_param    nslog      ${s1_navi_homedir}/bin/nslog.so
    ns_param    nsdb        ${s1_navi_homedir}/bin/nsdb.so
    #ns_param  nsproxy    ${s1_navi_homedir}/bin/nsproxy.so ;# comment out if using
                                                      # nsssl.so
#    ns_param    nsssl      ${s1_navi_homedir}/bin/nsssl.so

    #-----------------------------------------------------------------
    # Determine, if libthread is installed
    #-----------------------------------------------------------------
    set libthread [lindex [glob -nocomplain ${s1_navi_homedir}/lib/thread*/libthread*[info sharedlibextension]] end]
    if {$libthread eq ""} {
        ns_log notice "No Tcl thread library installed in ${s1_navi_homedir}/lib/"
    } else {
    ns_param  libthread $libthread
      ns_log notice "Use Tcl thread library $libthread"
    }

#---------------------------------------------------------------------
# s1 Socket driver module (HTTP)  -- nssock
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# s1 nsssl certificate
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# s1 PAM authentication
#---------------------------------------------------------------------
ns_section ns/server/s1/module/nspam
    ns_param    PamDomain          "pam_domain"

#---------------------------------------------------------------------
# s1 ADP (AOLserver Dynamic Page) configuration
#---------------------------------------------------------------------
ns_section ns/server/s1/adp
    ns_param    enabledebug $debug
    ns_param    map    /*.adp      ;# Extensions to parse as ADP's

ns_section ns/server/s1/adp/parsers
    ns_param    fancy      ".adp"

#---------------------------------------------------------------------
# s1 WebDAV Support (optional, requires oacs-dav package to be installed
#---------------------------------------------------------------------
ns_section ns/server/s1/tdav
    ns_param    propdir    ${s1_serverroot}/data/dav/properties
    ns_param    lockdir    ${s1_serverroot}/data/dav/locks
    ns_param    defaultlocktimeout  300

ns_section ns/server/s1/tdav/shares
    ns_param    share1      "OpenACS"
    # ns_param  share2      "Share 2 description"

ns_section ns/server/s1/tdav/share/share1
    ns_param    uri    "/dav/*"
    # all WebDAV options
    ns_param    options    "OPTIONS COPY GET PUT MOVE DELETE HEAD MKCOL POST PROPFIND PROPPATCH LOCK UNLOCK"

#ns_section ns/server/s1/tdav/share/share2
    # ns_param  uri "/share2/path/*"
    # read-only WebDAV options
    # ns_param options "OPTIONS COPY GET HEAD MKCOL POST PROPFIND PROPPATCH"

#---------------------------------------------------------------------
# nsproxy configuration
#---------------------------------------------------------------------
ns_section ns/server/s1/module/nsproxy
    # ns_param  maxslaves          8
    # ns_param  sendtimeout        5000
    # ns_param  recvtimeout        5000
    # ns_param  waittimeout        1000
    # ns_param  idletimeout        300000

#---------------------------------------------------------------------
# Database Pools: This is how NaviServer  ``talks'' to the RDBMS. You need
# three for OpenACS: main, log, subquery. Make sure to replace ``yourdb''
# and ``yourpassword'' with the actual values for your db name and the
# password for it, if needed.
#
# NaviServer can have different pools connecting to different databases
# and even different different database servers.  See
# http://openacs.org/doc/tutorial-second-database.html
# An example 'other db' configuration is included (and commented out)
# using other1_db_name
# set other1_db_name "yourDBname"
#---------------------------------------------------------------------

ns_section ns/db/pools
    ns_param    s1_pool1        "S1 Pool 1"
    ns_param    s1_pool2        "S1 Pool 2"
    ns_param    s1_pool3        "S1 Pool 3"

ns_section ns/server/s1/db
    ns_param    pools              s1_pool1,s1_pool2,s1_pool3
    ns_param    defaultpool        s1_pool1

ns_section ns/db/pool/s1_pool1
    ns_param    connections        15
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s1_db_name}
    ns_param    user              $db_user
    ns_param    password          ""

ns_section ns/db/pool/s1_pool2
    ns_param    connections        5
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s1_db_name}
    ns_param    user              $db_user
    ns_param    password          ""

ns_section ns/db/pool/s1_pool3
    ns_param    connections        5
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s1_db_name}
    ns_param    user              $db_user
    ns_param    password          ""

#---------------------------------------------------------------------
# Server s2
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# s2 Server parameters
#---------------------------------------------------------------------
ns_section ns/server/s2
    ns_param    minthreads  2
    # 1 minimal number of connection threads
    ns_param    connsperthread  1000
    # 10000; number of connections requests handled per thread
    ns_param    highwatermark  100
    # 80; allow concurrent creates above this queue-is percentage
    # 100 means to disable concurrent creates
    #
    # Compress response character data: ns_return, ADP etc.
    ns_param    compressenable  on  ;# false, use "ns_conn compress" to override

#---------------------------------------------------------------------
# HTTP redirect pages
#---------------------------------------------------------------------
ns_section ns/server/s2/redirects
    ns_param    404 "/global/file-not-found.html"
    ns_param    403 "/global/forbidden.html"
    ns_param    503 "/global/busy.html"
    ns_param    500 "/global/error.html"

#---------------------------------------------------------------------
# s2 Tcl Configuration
#---------------------------------------------------------------------
ns_section ns/server/s2/tcl
    ns_param    library    ${s2_serverroot}/tcl
    ns_param    autoclose  on
    ns_param    debug      $debug

#---------------------------------------------------------------------
# s2 fastpath
#---------------------------------------------------------------------
ns_section "ns/server/s2/fastpath"
    ns_param    serverdir  ${s1_navi_homedir}
    ns_param    pagedir    ${s2_serverroot}/www

#---------------------------------------------------------------------
# s2 Access log -- nslog
#---------------------------------------------------------------------
ns_section ns/server/s2/module/nslog
    #-----------------------------------------------------------------
    # General parameters for access.log
    #-----------------------------------------------------------------
    ns_param    file            ${s2_serverroot}/log/access.log
    # ns_param  maxbuffer      100 ;# 0, number of logfile entries to keep
                                    # in memory before flushing to disk
    #-----------------------------------------------------------------
    # Control what to log
    #-----------------------------------------------------------------
    ns_param    logpartialtimes true        ;# false, include high-res start
                                            # time and partial request
                                            # durations (accept, queue,
                                            # filter, run)
    ns_param    checkforproxy  $proxy_mode ;# false, check for proxy
                                            # header (X-Forwarded-For)
    #
    #-----------------------------------------------------------------
    # Control log file rolling
    #-----------------------------------------------------------------
    ns_param    rollfmt    %Y-%m-%d-%H:%M  ;# format appendend to log file name

#---------------------------------------------------------------------
# s2 modules
# Missing modules break the server, so
# don't uncomment modules unless they have been installed.
#---------------------------------------------------------------------
ns_section ns/server/s2/modules
#    ns_param    nssock      ${s1_navi_homedir}/bin/nssock.so
    ns_param    nslog      ${s1_navi_homedir}/bin/nslog.so
    ns_param    nsdb        ${s1_navi_homedir}/bin/nsdb.so
    #ns_param  nsproxy    ${s1_navi_homedir}/bin/nsproxy.so ;# comment out if using
                                                      # nsssl.so
#    ns_param    nsssl      ${s1_navi_homedir}/bin/nsssl.so

    #-----------------------------------------------------------------
    # Determine, if libthread is installed
    #-----------------------------------------------------------------
    set libthread [lindex [glob -nocomplain ${s1_navi_homedir}/lib/thread*/libthread*[info sharedlibextension]] end]
    if {$libthread eq ""} {
        ns_log notice "No Tcl thread library installed in ${s1_navi_homedir}/lib/"
    } else {
    ns_param  libthread $libthread
      ns_log notice "Use Tcl thread library $libthread"
    }

#---------------------------------------------------------------------
# s2 Socket driver module (HTTP)  -- nssock
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# s2 nsssl certificate
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# s2 PAM authentication
#---------------------------------------------------------------------
ns_section ns/server/s2/module/nspam
    ns_param    PamDomain          "pam_domain"

#---------------------------------------------------------------------
# s2 ADP (AOLserver Dynamic Page) configuration
#---------------------------------------------------------------------
ns_section ns/server/s2/adp
    ns_param    enabledebug $debug
    ns_param    map    /*.adp      ;# Extensions to parse as ADP's

ns_section ns/server/s2/adp/parsers
    ns_param    fancy      ".adp"

#---------------------------------------------------------------------
# s2 WebDAV Support (optional, requires oacs-dav package to be installed
#---------------------------------------------------------------------
ns_section ns/server/s2/tdav
    ns_param    propdir    ${s2_serverroot}/data/dav/properties
    ns_param    lockdir    ${s2_serverroot}/data/dav/locks
    ns_param    defaultlocktimeout  300

ns_section ns/server/s2/tdav/shares
    ns_param    share1      "OpenACS"
    # ns_param  share2      "Share 2 description"

ns_section ns/server/s2/tdav/share/share1
    ns_param    uri    "/dav/*"
    # all WebDAV options
    ns_param    options    "OPTIONS COPY GET PUT MOVE DELETE HEAD MKCOL POST PROPFIND PROPPATCH LOCK UNLOCK"

#ns_section ns/server/s2/tdav/share/share2
    # ns_param  uri "/share2/path/*"
    # read-only WebDAV options
    # ns_param options "OPTIONS COPY GET HEAD MKCOL POST PROPFIND PROPPATCH"

#---------------------------------------------------------------------
# nsproxy configuration
#---------------------------------------------------------------------
ns_section ns/server/s2/module/nsproxy
    # ns_param  maxslaves          8
    # ns_param  sendtimeout        5000
    # ns_param  recvtimeout        5000
    # ns_param  waittimeout        1000
    # ns_param  idletimeout        300000

#---------------------------------------------------------------------
# Database Pools: This is how NaviServer  ``talks'' to the RDBMS. You need
# three for OpenACS: main, log, subquery. Make sure to replace ``yourdb''
# and ``yourpassword'' with the actual values for your db name and the
# password for it, if needed.
#
# NaviServer can have different pools connecting to different databases
# and even different different database servers.  See
# http://openacs.org/doc/tutorial-second-database.html
# An example 'other db' configuration is included (and commented out)
# using other1_db_name
# set other1_db_name "yourDBname"
#---------------------------------------------------------------------

ns_section ns/db/pools
    ns_param    s2_pool1        "s2 Pool 1"
    ns_param    s2_pool2        "s2 Pool 2"
    ns_param    s2_pool3        "s2 Pool 3"

ns_section ns/server/s2/db
    ns_param    pools              s2_pool1,s2_pool2,s2_pool3
    ns_param    defaultpool        s2_pool1

ns_section ns/db/pool/s2_pool1
    ns_param    connections        15
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s2_db_name}
    ns_param    user              $db_user
    ns_param    password          ""

ns_section ns/db/pool/s2_pool2
    ns_param    connections        5
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s2_db_name}
    ns_param    user              $db_user
    ns_param    password          ""

ns_section ns/db/pool/s2_pool3
    ns_param    connections        5
    ns_param    verbose            $debug
    ns_param    logsqlerrors      $debug
    ns_param    driver            postgres
    ns_param    datasource        ${db_host}:${db_port}:${s2_db_name}
    ns_param    user              $db_user
    ns_param    password          ""
#---------------------------------------------------------------------
# end
#---------------------------------------------------------------------

ns_log notice "nsd.tcl: using threadsafe tcl: [info exists tcl_platform(threaded)]"
ns_log notice "nsd.tcl: finished reading config file."

Collapse
Posted by Tyge Cawthon on
Location of file that needs to be looked at.
path: /usr/lib/openacs/packages/acs-subsite/www/admin
file: index.adp, index.tcl

Variable in index.tcl
set main_site_location [util::configured_location -suppress_port=$suppress_port]

set full_acs_admin_url $main_site_location$acs_admin_url

variable $main_site_location appears to use the IP address, not the hostname when configured for more then one OpenACS instance.

Collapse
Posted by Gustaf Neumann on

Dear Tyge,

in case, you want to have multiple servers installed on one physical machine serving different domain names, you have at least the following options:

  • define for the same machine 2 IP addresses with the 2 domain names and run two NaviServer instances (two nsd)

  • use one IP address and register both domain names for it. Then define a subsite and register this via host-node map to the domain name (virtual servers by means of OpenACS). This way you have one nsd running, both sites share the same code base, using the same blueprint.

  • use one IP address and register both domain names for it. Then use NaviServer's virtual server to define two NaviServer servers in one nsd, and load OpenACS into both servers. This way you have one nsd process running, both sites have a different blueprint and can run different versions of OpenACS if wanted.

What you are doing above is the third variant, where probably the first two are simpler and sufficient. In most cases, the approach with the host-node map is sufficient and uses the least resources. We use this on our university for at least 6 domain names.

Hope this helps
-g

Collapse
Posted by Tyge Cawthon on
Gustaf - Thank you very much for your time on explaining the different methods.

I am trying to create three environments:
Development - Alpha

Quality Testing - Beta (identical to product with the exception of data in the database.)

Production - what the general public sees and uses

All three can share the same core OpenACS kernel and Naviserver, OS, but the databases need to be different.
Databases:
oacs-5-10-0-dev
oacs-5-10-0-qa
oacs-5-10-0-prod

I have tried method one (1), and it works fairly well, but more maintenance. Patching OS, OpenACS, etc. This is what I would like to move away from.

I really like your method two (2). Question: Does the host-node map somehow allow the use of a different database?

For example, If I add qa.celtic-arts.org to the host-node map will using the host-node map qa.celtic-arts.org know to use the oacs-5-10-0-qa database verses the oacs-5-10-0-prod? This is possible?

Does the university keep data separate from each host-node map? for example, do each of the 6 domain names have their own separate database?

Thanks again for your time.

Collapse
Posted by Gustaf Neumann on
When using the host-node map approach, all domain names share the same database instance. If one needs fully separate databases, host-node-maps do not help, since host-node-maps are based on subsites, all subsites share the same blueprint/code base/database.

Of course, we have also development and testing instances (on different machines) including the same host-node map approach.

Collapse
Posted by Tyge Cawthon on
Thank you for the response. I now completely understand.

Though the host-node map may not help in my case, I plan to play with this option to better understand how it works.

I have been using OpenACS off/on for many years and I like what the team has done with OpenACS. I wish I could be more helpful to the OpenACS team. Thanks again.