B4J Question Need advice for b4j web server

yfleury

Active Member
Licensed User
Longtime User
I have a b4j web server to demonstrate the potential of my web application to attract new customers. This is easy to do.

I wonder if it's a good idea to add to this website my web application (several google map javascript api with several markers {+3000})

I'm also wondering, how to separate clients that have multiple users. I thought of creating subdomains for each client like this
client1.domain.com
client2.domaine.com
And so on.
However, on the b4j web server, how to redirect the subdomains for the right clients.
Is it possible to create folders for each subdomain?

I appreciate all your advice and experience.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
I wonder if it's a good idea to add to this website my web application (several google map javascript api with several markers {+3000})
What you describe us mostly frontend so you shouldnt have any issue serving it from B4J. If the db will be the same then even more so.


'm also wondering, how to separate clients that have multiple users. I thought of creating subdomains for each client like this
Point each subdomain to the same server. The server receives the called url in the serveltrequest you can indetify each customer there.


Is it possible to create folders for each subdomain?
After that is up to you
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
how to separate clients that have multiple users
Why after user login not to check his properties ? Client id, role id, access rights in the interface... All these variants can be set for each user and used for routing by the URL, web-session...within the single domain.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
It is easy to dynamically generate webpage for every user on server side
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I don't think creating multiple subdomains is a good idea. Unless you want to run separate B4J Web server jar for each individual customer. If yes I would prefer to use different port numbers.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
How to use SSL certificate for such situation (many ports)?

nginx proxy manager (for linux servers only)... Also if it is containerized in docker the same port(s) can be used for all servers (containers) and nginx proxy manager will divert each subdomain to a different container.
 
Last edited:
Upvote 0

teddybear

Well-Known Member
Licensed User
How to use SSL certificate for such situation (many ports)?
aeric said that it will be no problem using SSL certificate to run separate B4J Web server jar for each individual customer
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
IMHO, the system should be smart enough using just one domain, one port, one SSL sertificate, one DB, one app .jar.... to distinguish any user, if he logged in correctly.
Or cluster of hosts, but internally redirected after login.
 
Last edited:
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
How to use SSL certificate for such situation (many ports)?

I mentioned something before but I suppose as I was not aware of it before I research it and get the knowledge I wanted, so are other people in here. What nginx proxy manager does is that it can create by itself an https connection outside and communicate inside VPS with the webapp in proper port with http so what it does is this:

Client <------ https communication ------> Nginx Proxy Manager <------ http communication -------> B4J webapp

You do not need in the webapp SSL certificate. You just create the subdomain (or new domain), you give it to it (NPM) and select "Add Let's Encrypt SSL" certificate and you direct the flow to the app (ip/port). Then click "create host" and it does it all by itself.
 
Upvote 0
Top