B4J Code Snippet Linux Port 8080 (vs port 80)

Ubuntu 14.04 and above:
The Root dir is var/www/html - (why they felt the need to change this is beyond me).

Prior to 14, the root dir was var/www

This upgrade to 14.04 broke sections of my app until I discovered this fact. Using port 8080 and listening on it sort of worked...

You may change the root dir in 14.04 by setting it back to var/www in the proper apache2 config file (as I did to fix my apps).
 

Harris

Expert
Licensed User
Longtime User
Just a question: why do you put it in the www folder? You can set it anywhere (like in your home folder) and it should work (I'm using Ubuntu 16.04). e.g. the feedback app run on my server in /home/alwaysbusy/feedback/
Cause I didn't know any better... I was just learning Linux back then with 12.x Ubuntu.
What I did know was that MS was BAD for a server.. (my client runs this and I feel the pain - weekly)

My root for AB apps (for the jar) is var/www
EVERYTHING that follows (for the AB app) is in var/www/www (js, fonts, css, my app folder) (took me awhile to figure that out when I first got started...)

I have my RDC in the Home dir.... Warwound set that up for me many moons ago.
I just figured out how to auto-start my AB app after a reboot! So many new and strange things to me. So many to distract from ABM coding.
That said, my VPS has never rebooted (and I have many) in the years I have had them running (unless I force it to).

Hell, I have limited gray matter to absorb ABM let alone the strange and funky world of Linux! GWW (google works wonders) - when all else fails.
I say 5 Hail Mary's if my PC allows me to login in the morning!

If we only knew what you know - many of us would not struggle so much. Thanks heavens for your and others support to help us along.
 

OliverA

Expert
Licensed User
Longtime User
Are we saying that previously you were able to use port 80, but now you are using 8080 since you can't use 80? If so, it could be because
  1. Port 80 is already used up by another web server (maybe Apache is installed).
  2. You're not running you app as root and therefore ports below 0-1024 are restricted (see this off hand Google search for some history/reason).
 

OliverA

Expert
Licensed User
Longtime User
I just figured out how to auto-start my AB app after a reboot
From my short memory, I think Ubuntu switched to systemd for the initialization for the system after 14.04. If so, you'll have to relearn how to restart you're app (can ping me at that time).
 

Harris

Expert
Licensed User
Longtime User
My ABM app works fine since it uses port 51049.
It was the AppUpdater for my Android app that could not find the dir which was off the root (var/www/apks) in 14.04.
Now that I reset the root (in Apache), it works fine with default port 80.
I installed Apache and php since I like to use phpmyadmin for managing MySql.
 
Top