How to deploy a web app on Digital Ocean ubuntu server

  1. 5 weeks ago

    Hi all,
    I have been developing Desktop apps and I recently created a test Webapp to try it out.
    I have read many discussions on the XOJO forum before I posted my issue.

    We have a droplet on Digital Ocean using ubuntu server.
    My question is: is it possible to deploy the web app and be able to see it run like it does in debug mode?
    I am using Filezilla for binary transfers and so far I tried both Stand Alone and CGI files.
    I am new to XOJO Webapps and I cannot figure out what I am doing wrong.

    Thank you in advance.
    Nikos

    @NIKOSZACHARAKIS However when I execute the "ssh..." command the terminal just stays idle! I also cannot connect with MySQL Workbench.

    A tunnel is just a pipeline between the two computers, that forwards a local connection securely to the remote computer.
    It won't do anything visible.

    The -L option is local_port:remote_address:remote_port
    So this command:

    ssh -L 3306:localhost:3306 dbadmin@178.128.226.123 -N

    creates a tunnel to 'localhost', looping back to yourself.

    Try this one:

    ssh -L 3306:178.128.226.123:3306 dbadmin@178.128.226.123 -N

    Then your workbench connection should work.

  2. Oliver O

    Aug 16 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro

    @NIKOSZACHARAKIS <...>
    We have a droplet on Digital Ocean using ubuntu server.
    My question is: is it possible to deploy the web app and be able to see it run like it does in debug mode?
    <...>

    http://developer.xojo.com/userguide/remote-debugging

    It seems, that you can debug only within a local network or when running on Ubuntu on Virtual Machine on your computer:

    The console version can debug console apps, standalone web apps and CGI web apps on remote machines that do not have a desktop interface (such as servers). Currently it can only be used across a local network (or VPN).

  3. Hi Oliver,

    I would like to thank you for your fast reply.

    If I understand correctly, my graphical interface that I developed in the web app Xojo environment, cannot run (be displayed) on the Ubuntu VM? Only by running the Remote Debugger as stated in the article on the link you sent me?
    If this is the case, then how can I take advantage of the Xojo Webapp capabilities? I thought it would have been an easy and straight forward task and I just purchased the Web, Database Servers license as well.

    Thank you.

  4. Oliver O

    Aug 17 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro

    Maybe I misunderstood your question(s)?

    Do you have a problem with

    a) start and run the webapp on your Ubuntu box?
    b) debug a running webapp on it?

    My above reply refers to b) only

    As for a) - have you studied this information?
    http://developer.xojo.com/userguide/web-app-deployment-overview

  5. Hi Oliver,

    Maybe I did not state my problem clearly.
    My question refers to your a) problem:
    a) start and run the webapp on your Ubuntu box?

    I have developed a simple Webapp that has a Graphical User Interface, such as
    text boxes, web buttons and web list boxes. When I run the Xojo debug (locally),
    it displays everything nicely on my Safari web browser.
    Now, how can I deploy(publish) a running version of my Webapp on an Ubuntu server?
    (on a droplet on Digital Ocean). The article refers to Stand Alone and CGI running from a command line.
    I just want to see my Webapp interface on my web browser after transferring the app and its
    libraries; e.g., by typing a url like "123.456.789.10/MyWebApp" or "www.???.com/MyWebApp".
    Is it possible?

    Thank you again for your time and support.

  6. Alberto D

    Aug 17 Pre-Release Testers, Xojo Pro

    You have to build for Linux, I think it is better as 64bit, upload your app and libraries, go to shell and execute your app. If your app runs with port 80 you point to 123.456.789.10 and will show your app, if it is running on another port just add the port with :8080 (for example). This is for standalone.

    If you create a CGI and you already have Apache (or other web server installed), you need to make sure you have cgi-bin active on your server, copy your app and libraries to the cgi-bin directory and you will see your app as 123.456.789.10/cgi-bin/mywebapp.cgi
    You can configure your web server to not need the .cgi and even remove the cgi-bin from the URL

    I haven't tested the standalone version but I tested the cgi with a vultr ubuntu server.

    I think the biggest problem is having the server access/configuration needed.

  7. Hi Alberto,

    I appreciate your your reply.
    I will try your suggestion with the CGI option and get back to you.

    Take care.

  8. John A

    Aug 17 Pre-Release Testers, Xojo Pro Las Vegas, Nevada

    I did a lot of this a couple of years ago. Mostly I used a local Ubuntu VM copy of the Droplet for speed.
    There were a few times I had to debug on the Droplet. There is some lag, but it does work.

    1. Upload the Linux 'Remote Debugger Console' stub to your droplet.
    2. Open a terminal on your droplet (via ssh or other remote terminal)
    3. Edit the RDS.config file in the Debugger Directory.
    4. Allow incoming port 44553 for the debugger, and port 8080 (or what your 'debug' port is set to under build)
    5. Run the Remote Debugger in the terminal window.

    On your desktop:

    1. In Xojo, add the IP number of your droplet as a remote.
    2. Run Remotely -> your droplet.
    3. debug...

    You should now be able to access your droplet directly from your browser to test. Use the port number you specified under debug build.

    Note: This is for debugging only. If you actually want to deploy, you'll need to Build, then upload the app and resources directories.
    Follow the above guide for deployment.

  9. 4 weeks ago

    Hi Alberto and John,

    I was caught up with some other things and I took more time to follow the solutions.
    Anyway, thank you both for your suggestions.

    I managed, after some internet surfing, to create a "cgi-bin" folder under "usr/lib" and also make it enable under the "apache2/mods-enabled" folder. After uploading my app, I changed the files permissions (read, write,execute) and when I entered the url "162.###.../cgi-bin/myapplication.cgi", it took sometime and returned a "Gateway Timeout" error as follows:

    Gateway Timeout.
    The gateway did not receive a timely response from the upstream server or application

    Any suggestions?
    Thank you.

  10. Alberto D

    Aug 23 Pre-Release Testers, Xojo Pro

    Nikos, I have never seen the cgi-bin folder under usr/lib but most configurations are different.

    Try to put a test web file under cgi-bin, a simple "Hello World" in perl or php is enough, to make sure you have the right configuration.

    This may help:
    https://httpd.apache.org/docs/2.4/howto/cgi.html

  11. Hi Alberto,

    Sure, I will give it a try. I guess I was very optimistic about it!
    The article I found regarding the cgi-bin folder is this:
    https://code-maven.com/set-up-cgi-with-apache
    Unfortunately I am not experienced with configuring remote servers and web cgi applications.
    I have no problem getting my hands dirty though. It is a learning curve for me right now.
    I appreciate your efforts to help. Keep you posted.

  12. Dirk C

    Aug 27 Pre-Release Testers, Xojo Pro Belgium, Zedelgem

    I can recommend the "Begin Programming Xojo Web" book by @Eugene D
    https://www.scispec.ca/index.php/books/9-beginning-xojo-web-programming-2
    Also cheap at about 12$
    Chapter 2 explains how to setup a cgi server for Xojo webapps.

  13. 2 weeks ago

    Hi Dirk,

    Thank you very much for your feedback. I just downloaded it and start reading. I hope it helps because I have hit a wall so far. I appreciate all of the other guys assistance. As soon as I get my web app up and running, I will post my solution to the forum.

    Take care.

  14. Hi Dirk,

    I have read and done everything on Chapter 2 relating to Ubuntu server and LAMP. I executed all the "sudo" lines of code. The line "sudo apt-get install php5-cgi" is obsolete, because the book is dated back in 2014 and I replaced it with "sudo apt-get install php7.0-cgi". Finally I transferred my testing web app under the location "/usr/lib/cgi-lib/" as the book says and when I entered in Safari the url "162.###.###.##/cgi-bin/mywebapp.cgi" I get the msg

    Not Found
    The requested URL /cgi-bin/mywebapp.cgi was not found on this server.
    Apache/2.4.18 (Ubuntu) Server at 162.###.###.## Port 80

    I use FileZilla to transfer the files, with Binary mode. My cgi file has 755 File Permissions.
    I hit a brick wall every time! it is really frustrating to make my simple testing web app to run. All the people, including you, have sincerely tried to help but the task seems impossible.
    I really did not expect this when I purchased XOJO and especially working on its web IDE platform. This is the last chance I am giving it, because I have wasted numerous hours and the people who are expecting results from me are getting tired!

    Thank you once again.

  15. Alberto D

    Sep 10 Pre-Release Testers, Xojo Pro

    Nikos, if you are willing to share the login credentials or create a new droplet with Apache installed I can take a look. Send me a PM if you want me to help you with this. I think cgi-bin is not active on your server or is not in /usr/lib/cgi-lib

    Using Xojo Cloud you don't need to worry about this things. I think there is other hosting service with Xojo support too.

  16. Dirk C

    Sep 10 Pre-Release Testers, Xojo Pro Belgium, Zedelgem
    Edited last week

    @Alberto D;Poo I think there is other hosting service with Xojo support too.

    Yes, Server Warp also has Xojo support

  17. Dirk C

    Sep 10 Pre-Release Testers, Xojo Pro Belgium, Zedelgem
    Edited 2 weeks ago

    @NIKOSZACHARAKIS I really did not expect this when I purchased XOJO and especially working on its web IDE platform. This is the last chance I am giving it, because I have wasted numerous hours and the people who are expecting results from me are getting tired!

    Unfortunately it looks like you might be running into limited knowledge of Webserver deployment, rather than Xojo limitations.
    It is indeed not so simple if you want to run your own server. You need to set it up correctly to get it to run.
    My situation is even different than yours, since we deploy standalone executables for api use (so they never have sessions that I need to take into account.)
    The easiest might indeed be to let someone have a look (Alberto offered to have a look) at what might be wrong. It's probably some setting that isn't right, but if you are not experienced it might be like looking for a needle in a haystack.
    I understand your frustration at the learning curve which seems very unlike Xojo.

  18. Oliver O

    Sep 10 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro
    Edited 2 weeks ago

    I also wrote some how-to guide, but it was for a Ubuntu 14.04 LTS virtual server, and some of the libs may have changed in the meantime...
    But maybe you find some help or hints anyway, here (chapters 11 or 12):
    https://osswald.com/koblenz16/vps_linux_setup.pdf

  19. Hi Dirk,

    I just purchased a service (Linux) from ServerWarp in order to try out my luck there. Is it the norm that the service initially gets a status of "Pending"? Furthermore, I tried to find out more documentation on how to use Serverwarp services and how to manage my uploads etc., but I have not found anything yet. Even the knowledgeable/FAQs has a 0(zero) number! Do you have any experience in using this service? I have already opened a ticket with them and I am on stand-by.

    Thank you.

  20. Paul B

    Sep 11 Pre-Release Testers, Xojo Pro Europe (UK, Somerset)
    Edited 2 weeks ago

    I use it and really happy with it. Phillip will make contact when server commissioned with full details of how to get everything up and running. Which OS are you developing on?

    I use Windows, compile as 64 bit Linux I use CGI. Upload all files using winscp with your server details. Once uploaded use winscp to make all directories and files 0755 executable. Your app will run, point your browser at it and away you go.

  21. Newer ›

or Sign Up to reply!