Cpher Cass
Cpher Cass

Reputation: 51

How can I reach my localhost over the web from outside local? i.e ip/page?

I installed usbwebserver

everthing is running, I am trying to reach the root page index.php?

I read everything I possibly can and sorry but I still cant figure out how to reach my localhost

I reach my page with localhost:8080 and the page I want shows up but if I replace it with IP:8080 it does not.

I am trying to reach this page outside of my local network.

Upvotes: 0

Views: 2768

Answers (4)

Mike Horstmann
Mike Horstmann

Reputation: 588

I'm sorry, I need to provide you a separate answer for your reformatted question for the "down the street" scenario. I can troubleshoot a few of the issues you're probably having.

  1. ISP's don't typically allow residential internet connections to serve resources over port 8080, or 80. Even if you were to configure your computer as needed, if you're on a standard internet service provider they're probably blocking you in the middle even if you have punched holes all your local security in an attempt to serve assets over port 8080/80.
  2. Assuming they don't allow that you're going to have to first configure your outbound middleware(php in your case) to listen to calls into your ip on a different port. ( You can do this in your C:\WAMP\ folder, in the "wampserver" configuration file. Here's a good walkthrough here: (http://forum.wampserver.com/read.php?2,13744)
  3. Now, you're going to have to drop any firewalls windows/ubuntu/macOS are providing on that port. (This is the part where you've rolled out the red carpet for hackers to get into your box(es) so be careful!) Here's a link for a short and sweet explanation on windows here: (http://yourbusiness.azcentral.com/turn-off-windows-firewall-19396.html) Note that you can open individual ports, you don't have to drop your entire firewall.
  4. Make sure you have opened up access to any folders/mySQLdb's/resources to outside requests as well (seriously, this is a REALLY bad idea from an @home server if you don't know what you're doing)
  5. Then figure out the correct ip and the correct port and give it a go! If it still doesn't work you can download a program like [wireshark] (https://www.wireshark.org/download.html) or [fiddler] (http://www.telerik.com/download/fiddler/fiddler2) to debug your inbound/outbound traffic and see what the machine's seeing before your browser/server gives you any user visible information.
  6. One thing to note, if you are an amateur web developer your homepage is called "index.html" not "home.html" "home.html" only works fine locally, but internet browser engines look by default, for "index.html"

Lastly, and I really can't stress this enough don't host through your personal ISP and serve files from your own machine. Hosting through Fatcow, or hostgator, or any of the other hosts is really honestly dirt cheap and they know far better than you or I do about security.

That said, I hope very much that you succeed in using my answer, or at the very least learning something from it. Happy Coding!

Upvotes: 1

RebornChild
RebornChild

Reputation: 1

First find your outside ip adress not local ip. After that go into router panel and open to use from apache server. Anyone able to access that port now. You can connect outside your local website now. If you can't do that. Try again. This is the way to doing this.

Upvotes: 0

Mike Horstmann
Mike Horstmann

Reputation: 588

go to a command line, type "ipconfig" Hit Enter.

Under "Ethernet adapter Ethernet:

It should be the third line down, has your following:

IPV4 Address : 192.168.1.xxx where "xxx" is your ip address.

USE "//" + "the ip address shown for (ipv4)" plus ":8080" and your default page should show just fine.

For example, if your cmd "ipconfig" for this process reads: "192.168.1.12"

your total URL in your browser will be "//192.168.1.12:8080"

Note that I used 2 forward slashes prior to using an IP address on your local network. That let's your computer know it's using your network, not the actual internet. The slashes alone may solve your problem. Also note, if you're accessing a database through your webapp, you will also need to properly configure your db settings to allow access.

Upvotes: 0

csguth
csguth

Reputation: 576

http://www.canyouseeme.org/

--

Read the Background session

Upvotes: 0

Related Questions