Something strange is happening. The matter is when I installed apache2 by using sudo apt install apache2 the installation got successful without any errors and warnings. When I allowed "Apache Full" in ufw, there were also no errors or warnings. I opened the browser on that machine where my apache server is hosted and entered the ip address on the url bar the apache test page became visible which is expected. I got the ip address from the command ip addr. localhost was also working.
Here begins the twist:-
When I tried to access the server from another computer with different internet connection I was unable to access the test page.Connection refusedin firefox, can't reach this page in edge.
Actually I was using my mobile phone's internet usb tethered with the server computer. When I just turned off the internet connection I was able to access the test page on browser of server computer and also on my mobile phone browser, but not in any other device.
Please help me out of this situation. Thanks in advance.
I use Kubuntu with backports ppa enabled and kde plasma 5.22(latest).
The IPv4 address that you are referring to "192.16x.xx.xxx" is an IP address on your local network. By default it is not visible to devices that are not on your local network i.e. if you try connect to your server with a device that is not connected to your local network using "192.16x.xx.xxx" it will not connect. A mobile phone using a 4G connection is not on your local network, a mobile phone connected to the same wifi network as your server computer is on the local network. Note it goes without saying that if your server computer firewall is blocking connections that even devices on your home network will not be able to connect to "192.16x.xx.xxx"