Issue
Sorry for the newbie question.
I've been playing around with an AWS EC2 to start understand how it works and a doubt has popped in my head.
I've got an instance running Debian Linux, I installed apache on it and when I access the public IP address I see the content I would usually see when accessing the localhost
of the machine, so the doubt here is:
Will the localhost of the instance always be the content seen when accessing the public IP address? Say, I uninstall apache and instead get a docker container pointing to localhost, will I access the docker container when accessing the public IP Address?
Solution
to summarize if you run apache on port 80 and point to HTTP://public-ip (this exactly means HTTP://public-ip:80)
so if you run at the same time a container on port 80 it will not run, you will get an error saying that port 80 is already in use
you will always get what's running on port 80 if you point only to the public IP.
if you want to run other stuff in parallel you can use a different port and point to HTTP://public-ip:port
Answered By - Kamèl Romdhani Answer Checked By - David Goodson (WPSolving Volunteer)