dyn dns & web server problem

Discussion in 'Linux Networking' started by Michael Powe, Nov 2, 2003.

  1. Michael Powe

    Michael Powe Guest

    hello,

    i have a domain set up at dyndns.org for my PPPoE dsl connection.
    this works fine & allows me to ssh to the box easily when i'm
    travelling.

    today, i notice the following behavior. if i access a web server on
    that box with the external name, it works fine as long as i specify a
    page name.

    if i specify a directory without a name, however, the domain name
    changes to the local machine name (in the browser address bar). i
    don't like this one bit. although i can't think of a direct way
    anyone could use the internal name of a machine to do something nasty,
    i'm not a hacker. just as importantly, this action renders the
    internal links unusable. while i could certainly change all the hrefs
    to point back at the external name, that is not my preferred solution.

    so, it looks like this.

    http://www.my_dns_name.com/dir/filename.html # works
    http://www.my_dns_name.com/dir/ "redirects" ->
    http://my.internal_machine_name.com/dir

    if "dir" has an index/home file in it, that will be displayed.

    i have no idea what is causing it. is there something in my apache
    config that needs to be set (it's just the default 1.3.27 config, as
    far as i can recall, with the exception that i've configured cgi) or
    is this an artefact of the NAT configuration on the box (done with
    iptables)?

    yes, i know that i shouldn't be running a web server on my firewall.
    it's my only realistic option, right now.

    if anyone could suggest how i can stop this particular behavior from
    occurring, i would much appreciate it. i have some stuff i want to
    put up.

    thanks.

    mp
     
    Michael Powe, Nov 2, 2003
    #1
    1. Advertisements

  2. A URL that ends with a dir, requires a trailing slash.
    See Apache docs for UseCanonicalName.

    But setting that Off just compensates for your errors, so you should fix
    ANY URL that ends with a directory to include a trailing slash.
     
    David Efflandt, Nov 2, 2003
    #2
    1. Advertisements

  3. Michael Powe

    Michael Powe Guest

    David> On 2 Nov 2003 17:09:00 GMT, Michael Powe

    David> A URL that ends with a dir, requires a trailing slash. See
    David> Apache docs for UseCanonicalName.

    David> But setting that Off just compensates for your errors, so
    David> you should fix ANY URL that ends with a directory to
    David> include a trailing slash.

    well, thanks. i'll look at that at once. however, it's not "my
    error." it's SOP for people to go to a web site and type in a
    directory name w/o a backslash. i don't type
    http://ctc.homelinux.net/, i type http://ctc.homelinux.net. and so
    forth. even if i were to tell someone to use a backslash, the
    likelihood is, they wouldn't.

    thanks again.

    mp
     
    Michael Powe, Nov 2, 2003
    #3
    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.