Jump to content

Accessing my Localhost from other computer


Weiss

Recommended Posts

Hello all, I"m kinda new in all this coding thing.

im trying to learn some php and sql.

ive installed apache24 on my windows10 computer. i can access my localhost files. my question is, lets say i make a site and save it so when i enter localhost i can see it, how can i show it to my friend for exmple who is somewhere else. if i give him my ipv4 adreess he cant log in, i must be doing something wrong here, 

thank you in advance for your help

Link to comment
Share on other sites

If it's someone who is not on your local network then you need to configure your router to forward traffic on port 80 (at least) to your computer.  It doesn't work by default because your router doesn't know what to do with incoming HTTP traffic.

Link to comment
Share on other sites

Right, I said if they are *not* on your local network, then you need to configure your internet-facing router.  You also have to make sure that your ISP doesn't block inbound port 80 traffic for your account, sometimes they do that on home service accounts.  If they are on your local network then they just need to use your computer's network name or local IP as the domain name.

Link to comment
Share on other sites

If you want to look into it, figure out which router you have and look up how to configure it (there should be a web page GUI), and then you need to set up port forwarding, to forward traffic on port 80 to your server's IP address.  You'll also want to make sure that computer uses a static IP from the router instead of getting a dynamic IP every time so you don't have to change the port forwarding rules.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...