B4J Question [ABMaterial] Need VPS deployment tutorial

Cableguy

Expert
Licensed User
Longtime User
Hi guys...

I've been trying to find some detailed info about deploying my ABM App in my 1&1.com vps server, but no luck. I keep getting error related to io.file not found and permission denied issues.

[EDIT] I keep forgetting about SUDO!

So is there a tuto for deploying an ABM app in a vps?
 
Last edited:

stanmiller

Active Member
Licensed User
Longtime User
By default the content for B4J webapps (including ABMaterial) are assumed to be located in the 'www' folder of the webserver. The problem with this assumption is that not all hosts follow this convention. Other hosts use 'public_html' as the default folder for public facing content.

If you want to use the default structure and your host does not have 'www' as their root, then make a 'www' folder in the root of public Internet folder and put your site under it. The .JAR goes in the parent to 'www'.

Here's the typical layout for an ABM webapp. Our webapp is named 'siteone'.

4_abm_app_structure_zpsqijrrrdv.jpg


Starting with ABMaterial 2.00 you can configure the root path to your site. See this thread for more info.

Request for configurable App and Content folders
https://www.b4x.com/android/forum/t...le-app-and-content-folders.71018/#post-463352
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
very nice info graph!

I am now able to start the server, ut the page is not served.
If I access the page directly, then I have no dynamic behaviour and no connection to the jetty server
I'll dig a bit more...

btw, how would the site address look like ( assuming default port (51042))??
 
Upvote 0

stanmiller

Active Member
Licensed User
Longtime User
very nice info graph!

I am now able to start the server, ut the page is not served.
If I access the page directly, then I have no dynamic behaviour and no connection to the jetty server
I'll dig a bit more...

btw, how would the site address look like ( assuming default port (51042))??

A typical ABM url looks like this where you specify the port and the appname. If you don't specify the appname you'll get an error.

https://www.macthomasengineering.com:51050/siteone/

To make it easier for visitors, you can add a root filter to automatically redirect them to the entry page. Then all you need is the port.

Add "root filter" to redirect visitors to site entry page
https://www.b4x.com/android/forum/threads/abmaterial-add-“root-filter”-to-redirect-visitors-to-site-entry-page.72225/
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Thank you very much @stanmiller

With your pointers and a suitable TCP/UDP firewall setting I was able to get it working.

One question thou.... If I set the ABM jetty server to run on port 80 or 8080, will I still need to use mywebsite.net:8080/mywebapp ????
 
Upvote 0

stanmiller

Active Member
Licensed User
Longtime User
Thank you very much @stanmiller

With your pointers and a suitable TCP/UDP firewall setting I was able to get it working.

One question thou.... If I set the ABM jetty server to run on port 80 or 8080, will I still need to use mywebsite.net:8080/mywebapp ????

That's a good question. We run Apache on our main site so 80 and 443 are already spoken for. However, I believe if there is nothing currently bound to 80 and 443 you could specify those when you start the webapp and could use links without the port.

Also, this thread may be related.

Apache Reverse Proxy to Jetty
https://www.b4x.com/android/forum/threads/apache-reverse-proxy-to-jetty.78054/
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
My VPS uses Centos with Apache an nginx, and I tried disabling/stopping Apache, but nginx seems to give me troubles, So I guess I will Just use a Landing page and simple redirects to my webapp.
 
Upvote 0
Top