Jump to content
Sign in to follow this  
Weiss

Accessing my Localhost from other computer

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

no what i mean is to access from the internet... not from my local network(which is by the way something i dont know how to do but im not interested in)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Ah i see, first of all thank you very much for your answer.

So from what youre saying it doesnt sound like a simple issue to solve, i guess ill pass that for now, thanx very much again.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...