'How to host moodle on raspberry pi online/public

So I installed Moodle LMS on my Raspberry Pi 3B+, and it works with url: localhost or 192.168.31.100 on Raspberry Pi 3B+ itself. First, why I can't access it on my PC with 192.168.31.100 because before installing Moodle it opened Apache2 webpage, but now it does not open it anymore(using same router connection). And my second question, is there any way to make Moodle LMS public/online. I searched a lot of sources online, such as using NoIp, DDNS, and port forwarding, but could not make it public.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source