My question is can I just type http://mydomain.com (without port address and MyWeb) to show my web site ?
Is this handle via ABM or via domain or what? I am newbie to this kind.
Look at the StartServer and StartServerHTTP2 in the ABMApplication class module. In both there is a section that you need to uncomment one line
B4X:
' uncomment this if you want to directly access the app in the url without having to add the app name
' e.g. 192.168.1.105:51042 or 192.168.1.105 if you are using port 80
srvr.AddFilter( "/", "ABMRootFilter", False )
Make sure you have ABMRootFilter.bas included in your project. If necessary, it can be found in the Templates directory
Completely forgot about that one! In case you use the ABMServer library, you will have to make this change in the library for now. I'll see it will become a parameter in a future update.
So an update IS planned!(?)
May I suggest that the new SSL library and functional code to be included so that managing ssl can be a pleasant experience instead of the current nightmare state!?
You should be able to modify your .htaccess file as I described then.
When you point a Web browser at your url it'll look inside your wwwroot folder. In there you should create the .htaccess file as I described above. Then you can force the browser to automatically point anywhere you want
Use nano or vim or whatever text editor you prefer to create / edit the file
Look at the StartServer and StartServerHTTP2 in the ABMApplication class module. In both there is a section that you need to uncomment one line
B4X:
' uncomment this if you want to directly access the app in the url without having to add the app name
' e.g. 192.168.1.105:51042 or 192.168.1.105 if you are using port 80
srvr.AddFilter( "/", "ABMRootFilter", False )
Make sure you have ABMRootFilter.bas included in your project. If necessary, it can be found in the Templates directory
If I included ABMRootFilter.bas in the project, got an error : ABMRootFilter is declared twice
If dont included, got an error Main - 63: Undeclared variable 'srvr' is used before it was assigned any value.
So I don't included ABMRootFilter.bas, changed the code into this
B4X:
Sub Process_Globals
Public Server As ABMServer
End Sub
Sub AppStart (Args() As String)
Server.Initialize("", DonatorKey, "123") ' Application = ' the handler that will be used in the url e.g. http://localhost:51042/template
Server.Port = 80
Server.srvr.AddFilter("/", "ABMRootFilter", False )
End Sub
You should be able to modify your .htaccess file as I described then.
When you point a Web browser at your url it'll look inside your wwwroot folder. In there you should create the .htaccess file as I described above. Then you can force the browser to automatically point anywhere you want
Use nano or vim or whatever text editor you prefer to create / edit the file
I managed to point my domain to ABM app just like a normal web address (ie www.mydomain.com) if ABM app listen to port 80, thanks to OliverA for his suggestion.
Since port 80 is usually used for http port, what are the effects if I used it for ABM app?
I use this VPS not only for ABM app, but for jRDC2 server and for download center. Will there any effect to jRDC2 & download center ?
I managed to point my domain to ABM app just like a normal web address (ie www.mydomain.com) if ABM app listen to port 80, thanks to OliverA for his suggestion.
Since port 80 is usually used for http port, what are the effects if I used it for ABM app?
I use this VPS not only for ABM app, but for jRDC2 server and for download center. Will there any effect to jRDC2 & download center ?
Install nginx proxy manager to your ubuntu server.
Configure the domain to point to this server
In nginx you can route any incomming traffic on port 80 or 443 to any server and port.
So you can host different web services on different ports which you can reach on different subdomains or different subpages.
As a nice side effect you can automate your lets encrypt ssl certificate generation.
For other services like jrdc, jitsy, video... you can configure streams in nginx to throughpass or redirect the ports.
Install nginx proxy manager to your ubuntu server.
Configure the domain to point to this server
In nginx you can route any incomming traffic on port 80 or 443 to any server and port.
So you can host different web services on different ports which you can reach on different subdomains or different subpages.
As a nice side effect you can automate your lets encrypt ssl certificate generation.
For other services like jrdc, jitsy, video... you can configure streams in nginx to throughpass or redirect the ports.
Thanks for your suggestion.
But for now, I think, I will not install others software to this vps, just stick to what ABM app can handle.
This is because, this vps is an active one, there are a lots users use it and I can't take a risk if something goes wrong by modification it.
I do have a plan to rent another vps, and when it is happen, I can explore many option, such as install Apache and most probably install nginx proxy manager as your suggestion.