apache+ssl, appends internal SSL port number with no trailing slash - broken link - modssl

This is a discussion on apache+ssl, appends internal SSL port number with no trailing slash - broken link - modssl ; Hello all. Thanks in advance for your expertise. Details: Centos 4.4 httpd-2.0.52-28.ent.centos4 openssl-0.9.7a-43.16 mod_ssl-2.0.52-28.ent.centos4 Problem: Apache listens for SSL traffic internally on port 55106. The gateway(keepalived/IPtables) forwards all external SSL requests from externalIP:443 to internalIP:55106. This works fine, except when ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: apache+ssl, appends internal SSL port number with no trailing slash - broken link

  1. apache+ssl, appends internal SSL port number with no trailing slash - broken link

    Hello all. Thanks in advance for your expertise.

    Details:

    Centos 4.4
    httpd-2.0.52-28.ent.centos4
    openssl-0.9.7a-43.16
    mod_ssl-2.0.52-28.ent.centos4


    Problem:

    Apache listens for SSL traffic internally on port 55106.
    The gateway(keepalived/IPtables) forwards all external SSL requests
    from externalIP:443 to internalIP:55106.

    This works fine, except when a directory is called WITHOUT a trailing
    slash.

    IE:

    secure/ is a directory that contains only a one line index.html file.

    https://www.example.com:443/secure/ - works fine and reads index.html.
    https://www.example.com:443/secure - doesnt work, and the URL gets
    redirected to https:/www.example.com:55106/secure!!

    Port 55106 is not accessible externally. Is apache assuming more than
    it should about network configuration? And most importantly, how can
    I stop this from happening?

    I've disabled all SSL related rewrites. I have also changed the
    internal SSL port number in the virtualhost config and sure enough, I
    am redirected to the new port number mysteriously by apache when the
    URL has no trailing slash...so it is definitely something that
    happens dynamically based on the internal SSL port number that is
    defined within the virtual host.

    I realize I could just rewrite a trailing slash, but this problem is
    much more far reaching that the simplified example I provided.
    Ideally I would like a solution that would apply to all instances of
    this problem across multiple directories and multiple sites.

    Thanks,
    James

    __________________________________________________ ____________________
    Apache Interface to OpenSSL (mod_ssl) www.modssl.org
    User Support Mailing List modssl-users@modssl.org
    Automated List Manager majordomo@modssl.org

  2. Re: apache+ssl, appends internal SSL port number with no trailing slash - broken link

    you can try mod_rewrite module in apache to manage the trailing slash.

    RewriteRule ^([^/]+)/$ index.html [L]
    RewriteRule ([0-9]+)$ index.html [L]

    Try adding like this Re-write rule.

+ Reply to Thread