3
I am using Ubuntu to host Apache2, MySQL and my website, and when I use my private IP address (10.0.2.15), I see my website! I want to know how I can “share” this address with others, so that they can get to my website, either using an IP address or a way to use a link to access it.
I tried changing my networking settings, but I do not know what to change it to!
Thanks, Ali
P.S. This is a virtual machine I am using, running Linux.
Ok, so the internet router is my personal router that I use with my other devices? Of course, my VM does not have its own router. – Ali Mosallaei – 2018-04-03T10:54:52.693
1Your VM may also have a build-in router. Usually its called NAT. But given that you can use the private address to access it, that should rule it out, unless you check it from inside the VM. If so, make sure you can also access it from outside the VM, on your own pc. – LPChip – 2018-04-03T10:56:09.643
@AliMosallaei Yes. the router where you have to open the port is the device that is connecting your whole network to internet. – jcbermu – 2018-04-03T10:57:24.270
1Thank you all! So basically, I just have to find my public IP address, then port forward port 80 to that address. – Ali Mosallaei – 2018-04-03T10:59:54.477
1Also, If imdo this, will anybody on any computer be able to access my website hosted on that IP? And is there a way to have a link forward to that IP address? – Ali Mosallaei – 2018-04-03T11:01:13.260
1
@Ali. Yes. Anybody could. Use a service as https://www.noip.com/ and you can have a domain name for the IP address.
– jcbermu – 2018-04-03T11:49:54.917@Ramhound, most decent routers have a NAT, and yes, you really can. All you have to do is have access to the router's admin features. Some ISPs will put in one of those awful gateway-style router-modem combos and try to lock you out of these features, but buying your own modem fixes that. – CDove – 2018-04-03T13:09:55.530
@jcbermu - You could complement your answer by including a short aside as to what one would need to do to then point a "domain name" to their new self-hosted website - i.e. register domain name with a registrar -> amend the DNS to point to their home public IP -> test that they can see their website by going to the name (once successfully forwarding the port to the right server IP. – Kinnectus – 2018-04-04T11:24:20.637