Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: About:Ubuntu Lamp Localhost & IP Address

  1. #1
    Join Date
    Feb 2011
    Beans
    12

    Question About:Ubuntu Lamp Localhost & IP Address

    Hello, I am new on ubuntu and I installed Lamp on Ubuntu And I can Access to the page "index.html" on var/www with Localhost but can not access with my IP address Any Idea how to fix this thing?
    Excuse my English.

  2. #2
    Join Date
    Dec 2008
    Location
    Southeast Europe, Serbia
    Beans
    278
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: About:Ubuntu Lamp Localhost & IP Address

    Are you behind a router? If so, you need to set up a virtual server on your router and enable remote access (every router is different, so look for instructions for your router on how to do this). Also, you may need to access your server from another internet connection, because most routers redirect you to your settings/status page if you are accessing it from the same internet connection. You can bypass this by using a proxy or VPN tunnel service.
    AMD Athlon64 x2 | 2GB DDR2 | 2 x SATA300 | HD3850 | Windows7 Ultimate SP1 32-bit/OS X 10.5.8/Ubuntu 10.10 32 bit

    Dell Vostro a840 | Windows7 Ultimate SP1 32-bit/Ubuntu 10.10 32-Bit

  3. #3
    Join Date
    Feb 2011
    Beans
    12

    Re: About:Ubuntu Lamp Localhost & IP Address

    Mr.Ben,
    Thank you for your Fast Reply I will try to configure my Router.

  4. #4
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,578
    Distro
    Xubuntu 14.10 Utopic Unicorn

    Re: About:Ubuntu Lamp Localhost & IP Address

    I think apache installs only listening on localhost by default. You have to edit a configuration file and restart apache to get it to listen on all addresses. I don't have apache installed here, but I think the configuration is in /etc/default/apache. Change the listening address from 127.0.0.1 to 0.0.0.0. Then restart apache.

    Once the server is listening for connections from other computers, you should be able to see the web pages from your local LAN.

    If your router is doing address translation and you want people on the internet to be able to see the server, then you will have to configure port forwarding in the router - configure it to pass TCP port 80 to the server. This configuration is specific to the type of router you are using. Also, you will probably not be able to connect to your public internet address from inside your LAN - you will have to use your private address from inside your own network.

  5. #5
    Join Date
    Feb 2011
    Beans
    12

    Question Re: About:Ubuntu Lamp Localhost & IP Address

    Thank youuu for your help i learn a lot but can't figure it out right now i can access it from my localhost & local ip address(http://192.168.xx.xx/) & now i want to access it by my freinds home (it's not working yet from my freinds home) what should i have to do? Once again I'm Truly Newbie

  6. #6
    Join Date
    May 2006
    Beans
    Hidden!

    Re: About:Ubuntu Lamp Localhost & IP Address

    There's a good chance that you are connected to your ISP via DHCP rather than a static IP.

    To get around this, check out https://help.ubuntu.com/community/DynamicDNS
    Linux Counter - 312953
    (on the 'new' DB)

  7. #7
    Join Date
    Jul 2006
    Beans
    436
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: About:Ubuntu Lamp Localhost & IP Address

    • Go to your router's internal IP address (192.168.1.1 or something).
    • Look for NAT (network address translation) or DMZ (demilitarised zone).
    • DMZ: Set this to the internal IP of your web server. Beware that this forwards everything to your computer - potentially not very safe.
    • NAT: You want to set up a forwarding rule that takes traffic from external TCP port 80 and forwards it to port 80 on the internal IP of your computer.

    And yes, your ISP using DHCP might be a problem. For myself, I've had the same "dynamic" IP for several months at a time.

  8. #8
    Join Date
    Feb 2011
    Beans
    12

    Wink Re: About:Ubuntu Lamp Localhost & IP Address

    Thx for your fast reply ill try what you said!!

  9. #9
    Join Date
    Dec 2008
    Location
    Southeast Europe, Serbia
    Beans
    278
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: About:Ubuntu Lamp Localhost & IP Address

    You should follow all instructions posted previously, but you should also check if your ISP enables server functionality for your subscription plan. There are ISPs that will block outgoing servers for home users with basic subscriptions. Since you use dynamic IP, this may be the case.

    The main configuration file is usually called httpd.conf, and is located in /etc/httpd or /etc/apache2 folder.

    The most important question is, what are you trying to do? You can accomplish different things in many different ways.
    AMD Athlon64 x2 | 2GB DDR2 | 2 x SATA300 | HD3850 | Windows7 Ultimate SP1 32-bit/OS X 10.5.8/Ubuntu 10.10 32 bit

    Dell Vostro a840 | Windows7 Ultimate SP1 32-bit/Ubuntu 10.10 32-Bit

  10. #10
    Join Date
    Feb 2011
    Beans
    12

    Re: About:Ubuntu Lamp Localhost & IP Address

    Quote Originally Posted by Ben Page View Post
    You should follow all instructions posted previously, but you should also check if your ISP enables server functionality for your subscription plan. There are ISPs that will block outgoing servers for home users with basic subscriptions. Since you use dynamic IP, this may be the case.

    The main configuration file is usually called httpd.conf, and is located in /etc/httpd or /etc/apache2 folder.
    Mr.Ben
    I'm trying to follow all instructions but i don't know how to follow (I don't have so much knowledge) but I searched a lot on all previously posted instructions for follow them but failed

    & sure I will search for "ISP" bcuz I don't know about that too...

    I found httpd.conf file on /etc/apache2 & i opened it It's empty


    Quote Originally Posted by Ben Page View Post
    The most important question is, what are you trying to do? You can accomplish different things in many different ways.
    I made a website thats locate on var/www i can see that on localhost but my friends can not see my website using my IP address.


    Quote Originally Posted by Ben Page View Post
    Are you behind a router? If so, you need to set up a virtual server on your router and enable remote access (every router is different, so look for instructions for your router on how to do this).
    Yeah, I have 2 routers i bought one for wifi othere one is from Internet Company
    I dont know the mean of Virtual server (You mean, do i have to open port 80?)


    Thx agggaaainnnnn.:

    Excuse my english.
    Last edited by abujp1993; March 1st, 2011 at 06:09 AM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •