Website subdirectories: httpd.conf or nameserver?

Discussion in 'Linux Networking' started by Rich Grise, Dec 23, 2004.

  1. Rich Grise

    Rich Grise Guest

    I have a web page up:
    http://www.mustangengr.com , that seems to display OK.

    Luckily, I have a hub on my DSL, so I've got two computers with different
    IPs. I can surf index.html, but when I try to look at
    http://www.mustangengr.com/richgrise , from the inside of the LAN it's
    OK, but it puts http://10.0.0.1/richgrise in the address window, since
    that's eth1 on the server, and, of course, when I try to access it from
    the other port on the hub, which is outside, 4.11.176.118 vs. 4.11.176.232 ,
    I get the error message:

    An error occurred while loading http://www.mustangengr.com/richgrise:

    Timeout on server
    Connection was to 10.0.0.1 at port 80

    So, clearly, I'm not configured right yet.

    Now, in the last couple of days I've done a lot of reading about this,
    (letting the public see a web site) and seem to remember having skimmed
    past something about subdirecories, but was it in reading about DNS, or
    was it in reading about Apache? ?:-|

    FWIW, Slackware 10.0, Apache
    The one thing I hate about these docs is that it's hard to know
    exactly where to start looking, like you're standing at the door of
    the Library of Congress, but there's no index. Or there's an index,
    but you don't know the name of the doc you're supposed to get.

    So, anyway, which path of discovery is more likely to yield an
    answer sooner?

    Thanks,
    Rich
     
    Rich Grise, Dec 23, 2004
    #1
    1. Advertisements

  2. Rich Grise

    Rich Grise Guest

    Apache 1.3,

    # rc.firewall Linux Firewall version 2.0rc9 -- 05/02/03
    # http://projectfiles.com/firewall/
    #
    # Copyright (C) 2001-2003 Scott Bartlett <>

    and the rest essentially right out of the box.

    Thanks!
    Rich
     
    Rich Grise, Dec 23, 2004
    #2
    1. Advertisements

  3. Rich Grise

    Rich Grise Guest

    And it's a dynamic IP, being served by ns8.zoneedit.com and
    ns17.zoneedit.com .

    Thanks!
    Rich
     
    Rich Grise, Dec 23, 2004
    #3
  4. Rich Grise

    HJohnson Guest

    Are you certain that your ISP does *not* block port 80? I know that many
    a large ISP does that just to keep possbile traffic "under control".
     
    HJohnson, Dec 23, 2004
    #4
  5. Rich Grise

    Tim G Guest

    Hi Rich

    In your httpd.conf file what is the ServerName directive set to?

    If it's set to 10.0.0.1 then, as far as I know, Apache will use that as the
    base for URLs. This works fine on your LAN but is no good from the
    "outside" since 10.x.x.x is a private IP range.

    You could try changing it to www.mustangengr.com or the public IP address to
    see if that does the trick. Adding the port number on the end, eg
    www.mustangengr.com:80 helps to tighten things up too from what I remember
    reading.

    Hope this helps

    Tim.
     
    Tim G, Dec 23, 2004
    #5
  6. Rich Grise

    ray Guest

    I can see the page from external.
    On my apache web server (www.rollingviolation.com) the listen line is:
    Listen x.x.x.x:80
    where x.x.x.x is the internal address (not the 24.x.x.x it resolves to.)

    from the inside, I can't connect to www.rollingviolation.com - I use
    "webbox" (the hostname) to connect. I believe it's because the fqdns
    name resolves to the 24.x.x.x address and my Linksys refuses to pass
    packets that way. (internal destined for external which is actually the
    external IP of the linksys mapped back to a NATted port on the inside.)

    If you design your site with relative links <a href="/">home</a> instead
    of <a href="http://mustangengr.com/">home</a> it'll work no matter
    where/what you call it.

    But, I think you fixed it... I can see the page from here. :)

    Ray
     
    ray, Dec 23, 2004
    #6
  7. Rich Grise

    ray Guest

    Check the page. Your index page works and your 404 error page works,
    but I get the same error.

    Ray
     
    ray, Dec 23, 2004
    #7
  8. Rich Grise

    Rich Grise Guest

    It's www.mustangengr.com, now. ;-)

    I just started down httpd.conf, and when I got to "This has to be a
    [FQDN]...", I remembered that that's the part I always skipped over
    before because I didn't have a FQDN.

    Works now! :-D :-D :-D :-D :-D :-D !!!!

    http://www.mustangengr.com/richgrise

    Thanks!
    Rich
     
    Rich Grise, Dec 23, 2004
    #8
  9. Rich Grise

    Rich Grise Guest

    [couldn't get to subdirs at the time of writing OP]
    Yeah, I got port 80 open day before yesterday, thanks to Antoine EMERIT's
    assistance. :)

    And since my OP, I got to ServerName in httpd.conf. :)

    Thanks!
    Rich
     
    Rich Grise, Dec 23, 2004
    #9
  10. Rich Grise

    PC Guest

    http://www.mustangengr.com this works fine... you are in California.

    http://www.mustangengr.com/richgrise this does too from the outside.. saw
    the picture etc.

    Your sample address had a colon on the end which should not be there after
    /richgrise

    Check the gateway setting on the netcard. I assume you are using a NAT
    router for the 10 subnet, so the gateway is the nat router IP, and not the
    public ip.
     
    PC, Dec 23, 2004
    #10
  11. Rich Grise

    Rich Grise Guest

    Thanks! Actually, I'm using IP Masquerading, rc.firewall, rc.inet1.conf,
    dhcpcd, dhcpc, bind, and so on. ;-) Slack 10.0.

    Say, have you ever heard of dhcpcd-eth0.exe not getting run? I'll be
    posting a Q about that with another subject.

    Right now, I'm trying to put three virtual servers on 4.11.176.232 :
    http://www.neodruid.com , http://www.neodruid.net ,
    http://www.neodruid.org ;

    I've go the three VirtualHosts, but I think I should take out the
    default ServerName - but that's just a WAG until I read that part.

    All I get with any of the 3 is the page at neodruid.com, but like I say,
    I scanned httpd.conf, and the HOWTO, and gave it a stab. ;-)

    Happy Solstice!
    Rich
     
    Rich Grise, Dec 24, 2004
    #11
  12. Rich Grise

    Rich Grise Guest

    I was all set to offer my "wisdom" ( ;-) ), until I saw "Linksys." I'm
    a Slacker - I've done mine from scratch. <dislocates shoulder patting
    self on back> Except for
    # rc.firewall Linux Firewall version 2.0rc9 -- 05/02/03
    # http://projectfiles.com/firewall/
    #
    # Copyright (C) 2001-2003 Scott Bartlett <> ,
    that is. :)

    Thanks!
    Rich
     
    Rich Grise, Dec 24, 2004
    #12
  13. Rich Grise

    Rich Grise Guest

    Yup!

    Thanks!
    Rich
     
    Rich Grise, Dec 24, 2004
    #13
  14. Rich Grise

    ray Guest


    I have no choice. My wife's work uses some weird non-standard IPSEC
    stuff. I say non-standard because it only works with _some_ hardware
    routers and is totally incompatible with Windows 2000's RAS. I have no
    idea if it's compatible with Linux but I decided it wasn't worth the
    effort vs a $40 Linksys. (She works from home.) In fact, on my old SMC
    barricade we had to upgrade the firmware with a special patch before it
    worked. (It might be compatible with Linux but it ranks about item
    #9987 on the todo list...)

    I only recently junked my first production slackware box I ever built.
    A 486/66 that was my hardware firewall until about 2000. 2.0.x Kernel.
    Slackware 4.0? :)

    Merry Xmas!
    Ray
     
    ray, Dec 24, 2004
    #14
  15. Rich Grise

    Rich Grise Guest

    Ah. Yeah, in a case like this, the $40. L. is the path of least pain. ;-)
    I heard a guy once describe himself as "A pragmatist. I go by, 'what
    works?'."

    But boy, y'know, speaking only for myself, I sure am glad I didn't go that
    route a year ago!

    I've just embarked on an adventure into sendmail-land, so you'll probably
    hear from me again when I need to come up for air. ;-)

    Cheers!
    Rich
     
    Rich Grise, Dec 25, 2004
    #15
  16. Rich Grise

    Ray Guest

    Is ok... that's why I like computers. Is a fun way to spend 12 hours... ;)
     
    Ray, Dec 26, 2004
    #16
  17. Disable UseCanonicalName !

    in httpd.conf :

    # UseCanonicalName: (new for 1.3) With this setting turned on, whenever
    # Apache needs to construct a self-referencing URL (a url that refers back
    # to the server the response is coming from) it will use ServerName and
    # Port to form a "canonical" name. With this setting off, Apache will
    # use the hostname:port that the client supplied, when possible. This
    # also affects SERVER_NAME and SERVER_PORT in CGIs.
    UseCanonicalName off


    Regards
     
    Antoine EMERIT, Jan 1, 2005
    #17
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.