Deployment - Getting Discouraged

Everything is in the cgi-bin folder, and the folder itself is set to 755. The other files and folders are set per Greg’s recommendations. I’ll try setting everything to 755 or 777, but someone cautioned that some servers don’t like certain files being given executable permission. In any case, I would expect a permissions issue to result in a 500, not a 404, but obviously I’m not an expert :slight_smile:

[quote=423106:@John A Knight, Jr]An FTP location and the HTTP URL aren’t always the same.
The FTP connection usually goes straight to the file system with the real location of the files.
Web servers have a habit of hiding the actual file by diverting the URL you asked for to where the files really are.[/quote]
It could very well be something like that. I use YummyFTP Pro, which offers the option to “Open as web URL”. The URL certainly looks fine - I see the whole path starting at the domain root and ending with my cgi file. But maybe there’s some redirection missing, or maybe it has something to do with the fact that it’s a “sandbox” of some sort that I’ve been given access to.

Hi Julia, some servers disable the cgi-bin directory, because you are getting 404 maybe this is the case.

Try a simple hello.cgi script to see if you get anything, something like

[code]#!/usr/local/bin/perl

hello.pl – my first perl script!

print "Content-type: text/html

";
print "Hello, world!
";[/code]

Thanks Alberto. I put that text into a file and named it “hello.cgi”, then uploaded it into the cgi-bin directory and set permissions to 755 - I still get a 404 on the client’s server and on GoDaddy, I still get a 500 :slight_smile:

I think I read here in the forum someone trying to make it work on GoDaddy, but I don’t remember if they were able to do it.

The 404 makes me think that the cgi-bin is not enable on your client’s server.

That was Sam Rowlands a few years ago, and GoDaddy told him that GLIBC is not available in low-cost hosting packages. I think you may be right about cgi-bin not being enabled, I will pester them tomorrow :slight_smile:

FWIW, if CGI was not enabled, the web server would either show you the file or send it to the browser as a download. IMHO, the most likely scenario is that the file is not where your url is pointing. Remember, web servers can redirect anything, so it would even be possible for you to have two urls like this:

http://domain.com/testA/app.cgi http://domain.com/testB/app.cgi
Which respectively point to

/home/web/TestB/app.cgi /home/web/TestA/app.cgi

@Julia Truchsess - have someone watch the web server access and error logs when you access that URL. It’ll probably tell you exactly what’s wrong.

It will show 404 if the cgi-bin directory is not in the same path.

Let’s say the server looks for files in:

/home/web/public

and cgi-bin is configured to (but not enabled)

/home/web/cgi-bin

Yes, if Julia put hello.cgi in:

/home/web/public/cgi-bin/hello.cgi

and try to run it as

http://domain.com/cgi-bin/hello.cgi

it should show the contents or send it to the browser as a download. But as I said before, many times the cgi-bin redirection is configured to a different directory.

I put a test html file in the directory one level above cgi-bin and I can access it. If I put that same test html file inside cgi-bin I get a 404.

If you put the app in the folder above the cgi-bin folder, does it work there?

If its not mentioned before: 1701 hosting is here: https://www.serverwarp.com/

If I move Alberto’s Hello perl script above cgi-bin it works - progress! There’s another (large) .htaccess file there which I can’t overwrite, so I prepended the Xojo htaccess text to it. After moving the rest of the Xojo stuff to that level, when I try to run my cgi script, there is a fairly long wait time - 15 secs or so - then an Internal Server Error :frowning:

What kind of access they give to you? Can you deploy as standalone app instead of CGI?

FTP access. I don’t know how I would launch a standalone app on their server, and really would rather not go that route I think.

So if I was to buy a hosting package from serverwarp for instance, how would I go about making the URL to my app look like it’s still part of my client’s domain? I’d rather not add maintenance of another domain registration to the scope of the project if it can be helped.

What if you just create a folder that is parallel to the cgi-folder and put all your Xojo web app stuff in that? This way you have the Xojo .htaccess file you want.

Same thing - long wait, then internal server error.

Having only FTP access is hard to see what is wrong.

A good configured server shouldn’t let you run apps/cgi outside the designated directories.

Another option would be to have hosting with more support and create domains like https://appX.domain.com

The easy way. In your HTTP server, you can have any content, from a Static HTML page, to a CRM. In that page, you put a simple iframe, pointing to the IP of the XOJO server. (In xojo, you have to configure to allow the use in iframes.)

same as David Cox
My web app is working perfectly with VPSDime.com for $12.00 include backup to the VPS