News

Apache HTTP Server Woes

Discussion in 'Other Off Topic Forum' started by UnholyDemon, Mar 29, 2005.

  1. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    I need help! I'm running an Apache server from my comp. It says to open port 80, TCP, for IP 127.0.0.1 on my computer for other computers to be able to access it. I can access the server from the computer it's running on using the LOCAL IP (127.0.0.1) but no other computer can access it using my external IP. I'm running through a router, of course. If I take off the router, it works fine, any comp can access it, so I know it's something to do with the router. What can I do? Here are my settings:
    http://img104.exs.cx/img104/6730/untitled1copy2iv.gif
    HELP!!!
     
  2. eps

    eps Rookie

    Sep 1, 2004
    31
    Sacramento, CA
    Full Name:
    Jason Knight
    You need to enable port forwarding. Without going into too much detail, there will be an area specifically for this in the router configuration. Ford port 80 to the local IP (not 127.0.0.1 – should be similar to 192.168.0.10) and it should work.

    What router are you using? I’ve probably got a spare one laying around and I could give you specific directions to get this working.
     
  3. Schatten

    Schatten F1 World Champ
    Rossa Subscribed Owner

    Apr 3, 2001
    11,234
    Austin, TX
    Full Name:
    Randy
  4. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    Yes, I know, I already forwarded the ports, as shown in the screenshot. I was told to use 127.0.0.1 because it is the internal IP of the SERVER. IE The internal IP used to access the server from a browser. I tried my local IP of the COMPUTER, but it didn't work. 192.168.0.100
     
  5. DGS

    DGS Three Time F1 World Champ
    Rossa Subscribed

    May 27, 2003
    34,407
    MidTN
    Full Name:
    DGS
    The only browser that would be able to use the "loopback" address would be running on the same server. You have to configure Apache for a "server" on your network interface (192.168-etc), and then tell your router to redirect incoming port 80 (and 443 if you have mod-ssl) to that same computer net address. Nothing outside the computer can access your 127.0.0.1 address.
     
  6. MikeZ_NJ

    MikeZ_NJ Formula 3

    Dec 10, 2002
    1,533
    Southern NJ
    Full Name:
    Mike Z.
    Yup.

    Actually, you CAN bind Apache to the loopback (127.0.0.1) address; you may even have to. I know that's how I have it set up on my Windows machine. Once httpd is bound to 80 on localhost, you can access it by typing in the address of the server (the 192... address) or by forwarding the ports on the router.

    The screenshot doesn't show the ports being forwarded on the router at all. You need to forward the ports on the router.
     
  7. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    http://www.portforward.com/dlink/di-604-portforwarding.htm

    Yes it does, that's how you forward ports on my router, I do it ALL the time. I've been running game servers for a LONG time now, and have had to forward ports to get other computers on the internet to see my servers up.

    All I want is for other computers over the internet to be able to access my server.

    I have forwarded port 80 (Public and Private), TCP, to IP 127.0.0.1 (The APACHE IP)

    Am I forwarding to the wrong IP?
     
  8. Schatten

    Schatten F1 World Champ
    Rossa Subscribed Owner

    Apr 3, 2001
    11,234
    Austin, TX
    Full Name:
    Randy
    yes, you are forwarding it to the wrong IP.

    if you do an ipconfig in a command prompt if it is windows based, what do you get? you do not want to say 127.0.0.1. While it is noted that you could it doesn't work that way. It is a local loop back and will only be accessible by you when you are at that system. So, what is the ip address that the d-link router is giving you?
     
  9. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    192.168.0.100

    But that doesn't seem to work either......

    When I forward my ports to it, if I type my External IP into the browser, it accesses my router.......
     
  10. Schatten

    Schatten F1 World Champ
    Rossa Subscribed Owner

    Apr 3, 2001
    11,234
    Austin, TX
    Full Name:
    Randy
    have someone test it externally. not you testing it internally.
     
  11. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
  12. Schatten

    Schatten F1 World Champ
    Rossa Subscribed Owner

    Apr 3, 2001
    11,234
    Austin, TX
    Full Name:
    Randy
    nada. while I can ping it just fine. when I connect to the IP, denied. I have a good feeling it has nothing to do with the router, but that's just my thought.

    did you say without the router/firewall someone else could connect? but with it they cannot?

    if so.. that blows my theory that port 80 is blocked, but you did try 8080 which is a start.
     
  13. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    Yep, and still not working...
     
  14. eps

    eps Rookie

    Sep 1, 2004
    31
    Sacramento, CA
    Full Name:
    Jason Knight
    I can’t connect to port 80 on 69.165.235.106 so check and double check that you have port forwarding enabled.

    If you are 110% sure you have it setup correctly, check your firewall configuration. Do you have it setup to deny anything?

    From a computer on your network, any computer, try to access the Apache server via HTTP at address 192.168.0.100 and see if it works. If it does, then you have Apache setup correctly. If it does not, then check your Apache configuration because it’s wrong.

    If #3 works, then it is one of the first two, guaranteed. It has to be.
     
  15. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    It works from the network, and I've double. triple, quadruple checked the ports. Also, the only firewall I have is the hardware one built into the router. Windows firewall is OFF.

    Here is what I just followed, and it STILL doesn't work....
    Except I used the ip 192.168.0.1 (My Local IP)
     
  16. MikeZ_NJ

    MikeZ_NJ Formula 3

    Dec 10, 2002
    1,533
    Southern NJ
    Full Name:
    Mike Z.
    Here's what I would check, in this order:

    1. Use a computer on the internal network to connect to your apache computer. Use the address http://192.168.0.100

    2. If that doesn't work, its an apache issue. Run "Apache.exe -k restart" from the bin directory to restart the daemon. If it does work, its a networking problem.

    3. If you get it working fine internally, try connecting from an external computer. We tried that, doesn't seem to be working, but if you make any changes, I'm sure you can get someone on here to try again. Don't try connecting to the external address from your internal network; some routers won't allow it.

    4. If its still not working externally, you *could* try taking the router out of the equation and connecting the machine directly to the internet and having someone external try to connect.

    5. If THAT doesn't work, I think the problem is probably with your cable company (Aldelphia, right?) blocking incoming port 80 requests. Some cable ISPs do that so you can't host your own webserver, which is a violation of TOS. Try a different port and start from step 1 again.

    Good luck.
     
  17. eps

    eps Rookie

    Sep 1, 2004
    31
    Sacramento, CA
    Full Name:
    Jason Knight
    I don’t know if that is a typo or not, but the Apache server is at 192.168.0.100 so use that. If that does not work, then check the firewall configuration. Make sure there is not a rule that will deny all traffic from the Internet to your LAN.
     
  18. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
    Yeah, it's 192.168.0.100, typo :)
    I checked the allow and deny for everything, and it's all clear to let people connect. When I unhook the router it works FINE, people can connect.
     
  19. eps

    eps Rookie

    Sep 1, 2004
    31
    Sacramento, CA
    Full Name:
    Jason Knight
    It looks like Adelphia blocks all traffic on port 80 (and others) in an attempt to “keep service for everybody good.” So it’s against their policy, but if you want to do it anyways you will have to change the ports around. Try it on some random ports, like 4564, or 3521.
     
  20. DGS

    DGS Three Time F1 World Champ
    Rossa Subscribed

    May 27, 2003
    34,407
    MidTN
    Full Name:
    DGS
    Is 192.168.0.100 the address of your router or your windoze box on your local lan? (At your windoze box, pull up a dos window and type "ipconfig /all" and see what it tells you its network interface is.)

    Most of those routers will do NAT, so from outside, you'd use the outside address of the router (69.165.235.106) and the router will forward that to the web address you give it (your windoze machine internally). Note that this generally means that you have to manually set the address of the windoze box. If you get a dhcp address, it might vary (if you have more than one dhcp machine on your internal net). I suspect the "127.0.0.1" schtick is an attempt to get Apache to work on a DHCP machine.

    If you have to use a port other than 80, you have to set the port numbers at your router, too.
     
  21. MikeZ_NJ

    MikeZ_NJ Formula 3

    Dec 10, 2002
    1,533
    Southern NJ
    Full Name:
    Mike Z.
    Only reason I'm thinking that might not be it is because without the router there, people can connect without a problem.

    Maybe try a different router?
     
  22. UnholyDemon

    UnholyDemon Karting

    Oct 1, 2004
    194
  23. wax

    wax Four Time F1 World Champ
    Advising Moderator

    Jul 20, 2003
    42,323
    SFPD
    Full Name:
    Dirty Harry
    #23 wax, Apr 2, 2005
    Last edited by a moderator: Sep 7, 2017
  24. MikeZ_NJ

    MikeZ_NJ Formula 3

    Dec 10, 2002
    1,533
    Southern NJ
    Full Name:
    Mike Z.
    So what ended up being the problem???
     

Share This Page