On Tue, May 14, 2024 at 6:07 PM Gavin Spomer <gavin.spo...@cwu.edu> wrote:
>
> Hello,
>
> I recently migrated my Apache web server from FreeBSD to Ubuntu Server and 
> found an issue with URLs that point to a directory, but don't include the 
> trailing slash, when going through our institution's load balancer. If I 
> access directly (not going through the load balancer), everything works fine:
>
>    http://mywebserver.example.com/application
>
>    Above works as, from reading the mod_dir documentation, it redirects to
>    http://mywebserver.example.com/application/ (adds the trailing slash) and 
> thus the application's index.php script
>    is executed.
>
> My web server is fronted by our institution's load balancer which does SSL 
> termination and then sends the request to my web server on port 81. I am not 
> seeing the same behavior when accessing through our load balancer:
>
>    https://loadbalancer.example.com/application
>
>    The above doesn't work. It hangs, times out and then redirects to 
> http://loadbalancer.example.com:81/application/
>    with a "This site can’t be reached" message. It does work if I explicitly 
> add the slash to the URL in my browser:

That's probably not the order that events are acutally happening. It
most likely redirects to
http://loadbalancer.example.com:81/application/ first.

[...]
> <VirtualHost *:81>
>    ServerName mywebserver.example.com:81

Redirects require a complete URL, and mod_dir is probably assembling
that using the ServerName. Use the developer tools in your browser or
curl -v to see what's actually going on, particularly the "Location:"
response header, which is the URL the redirect is sending your browser
to.

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to