I just want to know how a web server works by creating one in my own computer.

I have installed XAMPP and the apache server is running fine. I can access web pages hosted on my computer from local network.

But how can I make it accessible from the Internet? I use USB tethered internet connection on my system (my android device is connected to internet through LTE and I share this internet connection to my system using USB).

I tried to connect to my computer using a browser (http://[my_public_ipv6]) but it can't connect.

  1. Am I missing something related to port forwarding?
  2. How can i check whether my ISP allows incoming connection or not, if that matters at all?
    And i would be grateful, if anyone can provide some tips regarding security issues too.
  • 1
    1. Probably it's not port forwarding since you don't have router and NAT. 2. Check if your public IP is really a public IP. Sometimes ISPs give IP to mobile users IP from private range. – mrc02_kr Aug 31 '17 at 9:56
  • Usb thethering works like a router , i think as my system has an ip 192.168.*.* . Are you sure it's nothing to do with port forwarding? – Abinash Dash Aug 31 '17 at 10:11
  • 1
    I'm not sure since I don't know anyting about your system's configuration and network topology (you should describe it, if you want to get help). If you say that this USB act like a router, then you have to setup port forwarding on that router to be able to reach internal devices from external network. – mrc02_kr Aug 31 '17 at 10:17
  • My android device is connected to internet through LTE. I share this internet connection to my system using USB tethering . here's a link : en.m.wikipedia.org/wiki/… – Abinash Dash Aug 31 '17 at 12:20
  • You have public IP assigned to your phone which act as a router, so you definitely need to configure port forwarding on your phone. If you want to setup HTTP server which is going to be accessible from Internet buy normal router and static IP from your ISP or buy VPS server. If it's just for fun let it go: this website won't be any different from Internet than from your local network. – mrc02_kr Aug 31 '17 at 12:34

Finally after 15 days,my http server is up and running. Here's how it worked:

  1. I created one http server with XAMPP.
  2. Installed an app called 'Port Forwarder' from playstore
  3. Made a port forwarding setting by mapping : 6789 ---> 6789
  4. Switched on Usb tethering, and data connection on my android device
  5. Tried to access my web server from another device by entering the following address from mobile browser : http://my_public_ip:port/

And......yeah... I could successfully connect to my web server from that device.

Note 1 : As I failed last time with a service provider (say A), i tried this with a different service provider(say B). It was successful with B. So I think my expt failed due to some restrictions from service provider.

Note 2: For people who want to know the names the service providers,here is the list with which i've experimented.

Unsuccessful with

  1. Idea
  2. Jio

Successful with

  1. Aircel

Note 3: I will update the above list, if i get a chance to test this on other internet service providers.

Note 4: The app showed some minor errors, but still the web server worked. Sometimes I have to restart the app to make it work again. I'll report this bug to the team and ask for some help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.