I’m sure this is a simple problem for someone that knows what they are doing but, apparently, I do not!
I am trying to deploy a (most basic) Xojo web app to a GoDaddy VPS. The VPS is running CentOS 6.10. I am building the app in Xojo 2019R3.1. The web app is very simple - a button which displays a ‘hello world’ message box. I am trying to deploy it as a CGI app.
I am building it for a Linux 64-bit target. In the Shared build settings:
deployment type: CGI
port: have tried both ‘choose automatically’ and also ‘8080’… same result
On the server side, I have made sure my perl is working… a simple ‘hello world’ perl script in the cgi-bin folder does run successfully.
I have set the permissions on all files in the Libs folder to 755, as well as the cbtftest.cgi and cbtftest files.
I have tried running this with the Xojo-generated .htaccess and also without… same result.
For the Xojo web app, the browser is simply reporting “The server encountered an internal error or misconfiguration and was unable to complete your request.”, and then I get a 500 Internal Server Error after that.
From all that I have read, this is usually that some 32-bit libraries are not installed. But, I can’t figure out which ones - I’ve looked in various log files… and I can’t find any log file telling me anything about any libraries that can’t be loaded. The only related log message I can find is is the apache2 error_log file:
Can't use an undefined value as a symbol reference at cbtftest.cgi line 118.
End of script output before headers: cbtftest.cgi
FWIW, line 118 is this:
print $sock $body;
But, I am assuming that is more a symptom than a cause.
So, if anyone is able to help me figure this out, I would appreciate it.
I’m assuming you are telling me I should be running CentOS 7. So, I get that but there are already some apps running on this CentOS 6 server and before I push for an upgrade or spring for another VPS, I am trying to get this working in the environment I have…
I’m not quite sure what you mean with that, but, here is what I know:
the Xojo-generated Libs and Resources folders don’t have a .htaccess of their own
. I have tried this both with and without the Xojo-generated .htaccess in the cgi-bin directory… same result
the folder above cgi-bin (the root for this website) DOES have a .htaccess, but it is just adding a PHP handler. No deny or allow directives.
the folder above that (the www folder for the account) DOES have a .htaccess, but it is also just adding a PHP handler. No deny or allow directives.
I did just try adding the Xojo-generated .htaccess lines to the site root and the www folders… same result with the 500.
And, fwiw, all of the files have the same owner:group… and this is the same as the simple hello.cgi file I had created (which does work).
(The other apps that are running on this box are not Xojo, or perl for that matter [they are php]… so I’m not sure that helps… But, again fwiw, they do have the same owner:group as this xojo app I am trying to run).
As brian pointed out, other apps may run but a Xojo one will not.
If you’re planning to keep current, Xojo has announced that the future of Web will be Standalone builds only. I would not spend time learning to deploy a CGI app at this point unless you intend to stick with the existing web product. If you need help with what to do deploying a Standalone build, I just recently published a blog post that can help guide the way
On 64-bit systems libunwind8 has to be installed, and the executable needs exectute permissions. Also there needs to ve a cgi-script handler set if you use apache.
I have had great success at deploying multiple stand alone Web Apps using NGINX as a front end. It can manage certs and allow easy deployment of multiple apps on the same server using it as a reverse proxy.
It is pretty cool. You can compile the stand alone Xojo app to run on a specific “odd” port and have NGINX redirect the access from port 80 to a different port. You can use DNS to direct different domain names to the same IP address on port 80 and have NGINX sort it all out and direct the traffic based on the domain name to the correct stand alone app on the correct port.
There is an an open source version for multiple operating systems. I have used it on Windows with lots of success.
I even posted a sample config file here somewhere. Search for NGINX.
If you need help with a config file I can give you a working sample.