Forum OpenACS Q&A: where can i change the default url for oacs-9.5?

during the configuration i type in a domain that did not work. i should have left it to the default, localhost:8000. i used the ip address fine until i installed the dotlrn and then the non resolving domain came into play.

i have gone through the administration and expected to find something in the parameter settings but didn't. Hopefully, there's a file I can edit.

thanks.

Collapse
Posted by Benjamin Brink on
Hi Kenneth,

You're probably looking for the value for parameter SystemURL in acs-kernel https://openacs.org/api-doc/proc-view?proc=ad_url

I'll dig around abit locally via psql, but you might find it before I do, since you're already apparently looking at parameters.

cheers,
Ben

Collapse
Posted by Benjamin Brink on

psql to the db. Something like:

su - postgres
psql oacs-5-9

Then you can get the parameter_id:

oacs-5-9=# select * from apm_parameter_values where parameter_id in (select parameter_id from apm_parameters where parameter_name = 'SystemURL');

 value_id | package_id | parameter_id |             attr_value             
----------+------------+--------------+------------------------------------
       74 |         69 |           64 | http://localhost:8000
(1 row)
Collapse
Posted by Kenneth Wyrick on
thank you. i've re-installed it but it's good to know where the default url is installed. thanks again. i know have another using installing it. we are impressed that you are there to help us.
ultimately we need the dotlrn working
Collapse
Posted by Gustaf Neumann on
You are referring to the kernel parameter "SystemURL". It can be altered via the Web interface via /acs-admin/ . On this page see the link "Parameters" in the line "ACS Kernel". When you click this "Parameters" link, you find the "SystemUR" as last entry on the resulting page.
Collapse
Posted by Kenneth Wyrick on
Great. I forgot about exploring at the package level in the /acs-admin. thank you gustav now i need to figure out how to get the nsd as a service. sorry for mixing posts on this.
Collapse
Posted by Kenneth Wyrick on
Having problems with the links still pointing to localhost:8000 after making sure it has the domain name in the default url. I have rebooted the computer, restarted postgresql several times. is there a cache or another location where the localhost needs to be changed?
Collapse
Posted by Benjamin Brink on
Hi Kenneth,

Basically, the url is determined by SystemURL and the info provided in the nsd config.tcl file.

SystemURL needs the "http://"; prefix as shown above. The domain in config.tcl doesn't.

ps. As a noobie over the years, I've broken the system a few times by changing that value, where once it was changed I couldn't login to admin to change it back via a browser. I had to access the db via psql. If this is the problem, you can always change it back via the db.

Collapse
Posted by Gustaf Neumann on
the SystemURL is used sometimes on internal redirects, it is setup on the initial install via install-ns, which also writes the default config file. When you change the host configuration (using different ip-address etc.) you have typically to change both, the config file and the SystemURL, and as well the "service" file. In general, the NaviServer config file allows to configure the listen on e.g. all IP addresses of your machine (see the first section of the naviserver config file).

Concerning running as a service: Depending on the version of linux, install-ns creates either a UpStart file (usage: status|start|stop oacs-5.9) and/or a systemd file (usage: systemctl status|start|stop oacs-5.9). running on older Ubuntus, you get upstart, some ubuntu versions support upstart and systemd (where the script generates both), redhat/fedora/centus use sytemd. When you change e.g. IP-addresses and/or ports, you have to update the service files in use as well (see the comments in the service files).

Collapse
Posted by Kenneth Wyrick on
thank you for the details all is well up to this point
thanks for the nsd autostart solution with systemctl.

now onto other fish to fry under another post.
https://openacs.org/forums/message-view?message_id=5334718
dotlrn and email for notification the final 2 for an out of the box install, for me.

Collapse
Posted by Kenneth Wyrick on
as it turns out the systemctl does not recognize the oacs-9-5 as a service.
I ran the StartUp command, and it was not there when i went to install it. what should i do.
Collapse
Posted by Gustaf Neumann on
Different Linux versions might use different locations for the service file. The script install-oacs.sh installs it under /lib/systemd/system/, other configuration might expect it under /etc/systemd/system/. Remember, after you have installed the .service file, you have do a systemctl daemon-reload and you have to do a systemctl enable ... to make it active for restarts of the operating system (check with systemctl is-enabled ...). You can list all services known to systemd with systemctl list-units.

hope this helps.
-g

Collapse
Posted by Antonio Pisano on
On Debian I had to tweak a little install-oacs.sh so it created systemd script. I did that by setting brutally the systemd flag toward the end of the script.

Reason why it was not working is that probably Debian is a special case with respect to Ubuntu, as it doesn't ship upstart out of the box. Dind't take time to think about a proper fix, but it should just be some "if" revision.

Anyway, for what concerns Kenneth, give a look toward the end of the script and you'll see that systemd service creation is decided upon the value of a couple of flags. Check if your installation passes through the service creation part and if doesn't you can try hardcoding the flags.

Collapse
Posted by Gustaf Neumann on
Antonio,

The problem is/was that some recent versions of Ubuntu start to support systemd. Since 07/02/2016, the install script checks, whether it is running on a systemd-capable version of Ubuntu and generates in this case an upstart and a systemd .service file (see also [1])

My impression was that Kenneth was using a fresh version of install-ns, probably on a "recent" version of Ubuntu.

-g
PS: For problem reports concerning system integration, please always write the exact version of the Operating System, since this helps reducing the guess work, since everything is in flux.

[1] https://openacs.org/forums/message-view?message_id=5329981

Collapse
Posted by Kenneth Wyrick on
on ubuntu 16.04.4 server and downloaded the latest install-ns.sh and install-oacs.sh files.
your instructions were exactly what I needed.

kmw@fremont:/lib/systemd/system$ sudo nano oacs-5-9.service
kmw@fremont:/lib/systemd/system$ sudo systemctl daemon-reload
kmw@fremont:/lib/systemd/system$ sudo systemctl enable oacs-5-9.service
kmw@fremont:/lib/systemd/system$ sudo systemctl is-enable oacs-5-9.service
Unknown operation is-enable.
kmw@fremont:/lib/systemd/system$ sudo systemctl is-enabled oacs-5-9.service
static
kmw@fremont:/lib/systemd/system$

thank you very very much.

It's me again on Ubuntu 22.04 server this time.

My Installation is using:
https://github.com/oupfiz5/openacs-s6/blob/master/src/docker-compose.yaml

and: https://github.com/oupfiz5/openacs-s6/blob/master/src/.env

1.
on the http://oacs.caltek.net/admin/
For Site-Wide Administrators
ACS Site-Wide Administration (Site-wide administration)
http://localhost:8000/acs-admin/

and

2.
The Subsite Art
link is http://oacs.caltek.net/art
re-directs to http://0.0.0.0:8000/art/
with 404 - The file you requested could not be found