1

Hi I want to make my own SNS (Social Networking Site), so I installed LAMP on my Ubuntu 14.04. But its not accessible from the internet! I can run the server only on my computer by typing "https:\localhost" on my browser.

I don't want any domains; I just want that whosoever from any part of the world wants to use my SNS he/she just have to type the ip-address and my SNS opens i.e. I want my server accessible from the internet.

My router is Binatone DT 850W. Can you please tell me what should I do?

1

1 Answer 1

1

First, ensure that your machine has a static LAN IP address (either in the 192.168.. range or in the 10.0.. range, depending on how your router is set up). You can take a look at the  /etc/network/interfaces file to configure your eth0 (if you are using Ethernet to connect to your router) like this:

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

This example is for the case of 192.168.. network configuration. Consider changing it to your case (you can find your network specifics by running the ifconfig command).


After that, forward the port in your router's Port Forwarding section. You need to enable access from the outer world to your machine's Apache; by default, it's configured to use port 80 for HTTP and 443 for HTTPS.

If you have configured the static IP of your machine to be, let's say, 192.168.1.10, then the combination of IP and port that would match the Apache on your machine would be 192.168.1.10:80. To configure this, take a look at the section here.

If everything goes OK, then the world can access your Apache at YOUR.PUBLIC.IP/SNS, if SNS is the folder in your /www root that contains your social site.  (You can easily find your public IP, just search for "What is my IP".)

1
  • Some thing i couldn't post due to my reputation points: Are you well prepare to expose your home Apache to the outside world? Essentially you are exposing your host machine to the world, with all the security implications that this poses. If you are doing it just for testing it might be OK, but if you are considering serious use, I would suggest taking a look at any VPS or shared servers to host your application. Oct 3, 2015 at 9:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .