I have created an instance of Amazon’s Linux OS + App - LAMP - and am trying to get my apps up and running - I am trying a Standalone build because their cgi-bin is just utterly inaccessible.
Anyone running on LightSail who can kibbutz in with what they did to get Xojo apps up and running?
In my desperation, I am also trying to hack out Xojo app hosting on their 2019 server edition.
I am sadly new to this and have even considered building my own Pi based server.
a. I use Transmit to connect to the Lightsail instance via SSH. I upload the Linux executable folder to the main folder. Let’s say the app is called xyz and is in a folder with the same name.
b. I created a folder called “bin” and made it executable.
c. I created a file called “launch” in the bin folder and edited in the following text:
#!/bin/bash
pkill -9 $1
cd ~/$1
./$1 &
disown -h %1
cd ~
save the file and make it executable.
d. Do the same for a file called “unlaunch”, containing:
#!/bin/bash
pkill -9 $1
e. To launch the web app, use the Lightsail terminal feature, and type “launch xyz”.
f. To kill the web app in order to replace it with a new version, use the Lightsail terminal feature, and type “unlaunch xyz”.
UPDATE: I created a CentOS 7 instance and installed a number of libs / dependencies that were reported to be necessary on the system requirements page. Then I installed apache and used the chown command to change ownership of the html and cgi-bin directories… and finally became able to upload files to both directories.
Now I need to get my apps to actually work. -_____-
standalone apps just cause me to download the executable file…
cgi apps kick out an Internal Server Error.
Totally do not know what to do to get these brand-new installations to work.
I use FileZilla for Windows too.
To set permissions on a folder (or individual files), I right-click on the folder (or file) and a context menu pops up. In that menu, you should see an option “file permissions…” - click that, then you should see a popup with a grid of permissions that you can check (or uncheck) - or you can enter a numerical code at the bottom of the popup (my Xojo app folder is set to 755), which provides the correct set of permissions.
This sounds like an Apache configuration issue. I might suggest getting a web app running first and then adding layers like a reverse proxy. There’s a lot to learn.
First, an empty CentOS image will need a couple libraries for Xojo Web apps to run, you can use yum to install them.
yum install libsoup
yum install libunwind8
Then, you can upload your app with a SFTP tool, ensure the app is executable, and run it.
/path/to/my/app --port=80
You’ll see your app running at your server IP address now. This command leaves the process attached so if you cmd-c you’ll actually end the app. You can send it off on it’s own by putting an & at the end of the command, but you’ll have to retrieve the process ID to end it.
If you have Apache active, Apache gets the port 80 for it. If you don’t need a web server in your installation, don’t have it installed and port 80 will be free.