How can I make my localhost server be available online? (Apache,PHP)

23
2014-04
  • user2707299

    How can I make my localhost server be available online? (Apache,PHP) When I try to enter my IP address into the URL bar I get no result.

  • Answers
  • darent

    Not sure if this is the problem, but if you're entering your public IP it won't locate your server in the local area network, since that IP is the one from your router, not your server.

    Try to open the URL for your local IP, you can find it with ifconfig. If the server works, that means your apache is working fine in the local network, and the problem is in the router configuration (some port forwarding may be needed).


  • Related Question

    networking - how can i turn network interface (localhost) on?
  • Pavel K.

    localhost is off on my machine.

    it's described in my /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    
    auto eth1
    iface eth1 inet dhcp
    

    but when i run route

     route -n" with wireless off
    

    I get:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    

    how can i turn it on?


  • Related Answers
  • Daniel Le

    You can use ifconfig to check whether a network interface (e.g., the localhost interface (lo)) is enabled or not.

    You can use sudo ifconfig lo up to enable the localhost interface.