I have only one server. As mentioned in my post, I am running box
from the Unix shell at /web/default/wwwroot
which is my web root.
I’m clearly missing something here about the relationship between server.json, CFConfig, XML files for server setup, .CFConfig.json … I’ve seen a lot of these floating around and I’m not really understanding what the differences are between them, particularly in relation to how settings are set through CFConfig in the CommandBox shell. Maybe this will make more sense as I continue to problem solve?
I just completely rebooted my entire machine. Here’s an example of a set of commands I just ran:
ubuntu@ip :/web/default/wwwroot$ box
CommandBox:wwwroot> server list
Processing (1) servers, please wait...
wwwroot (stopped)
http://127.0.0.1:8080
CF Engine: lucee 5.4.3+2
Webroot: /web/default/wwwroot/
Last Started: 15-Dec-2023 21:20:10
CommandBox:wwwroot> server start
√ | Starting Server | √ | Setting Server Profile to [production] | √ | Loading CFConfig into server
CommandBox:wwwroot> server listProcessing (1) servers, please wait...wwwroot (running)
http://127.0.0.1:8080
CF Engine: lucee 5.4.3+2
Webroot: /web/default/wwwroot/
Last Started: 15-Dec-2023 22:15:20
CommandBox:wwwroot> cfconfig set adminPassword=mypassword
[adminPassword] set.
CommandBox:wwwroot> server restart
Trying to stop server...
> server stop 'wwwroot'
Stopping wwwroot...
Stopped
Trying to start server...
> server start name='wwwroot' openBrowser=false debug=false --!saveSettings
√ | Starting Server
| √ | Setting Server Profile to [production]
| √ | Loading CFConfig into server CommandBox:wwwroot>
When I now go to the server admin page, the password works, but when I enter, I get to a page that says, “Error - requested action does not exist” and when I click any other link in the administrator, I’m spit back out to the login page.
- that command, as you ran it, would only modify the server context of Lucee. Setting the web context password would require a slightly different command as documented here.
I’m afraid there is nothing at that link about setting the web context password.
Just to clarify some things:
- I have not and never will run CommandBox as root.
- I have never run Commandbox anywhere but in the
/web/default/wwwroot
folder. - I am also using Nginx as a reverse proxy (as I learned from you yesterday that this is the only option available for serving port 80.)
- I am attempting to access the admin pages externally through port 80 as I am on a GUIless server and can not administer them internally.
I also want to note that one of my chief concerns is what appears (to be clear, appears to me) to be the ephemeral nature of CommandBox server instances. Something that really scares me about CommandBox is that it seems like the server just sort of disappears forever when a server stop
command comes through. So I worry a lot about how all the configurations are being saved permanently so that I don’t have to, say, set a new Web administrator password every time the Lucee server – or the Ubuntu machine – has to stop and restart. This is where I am really unclear on the CFConfig/.CFConfig.json/server.json point from earlier. Perhaps it would help to note that my end goal is a stable, public, production web server for just one website that runs as a service on Ubuntu that I leave alone and update only as needed?