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:

   https://loadbalancer.example.com/application/

   The above works and executes the application's index.php script.

I contacted the admin of the load balancer and asked if there had been any 
changes to the settings, but he indicated that there wasn't and that there was 
no inspection, rule processing or manipulation of the URL on the load balancer 
end.  When I had my web server on FreeBSD it worked, but I don't recall doing 
anything configuration-wise to make it work with our load balancer beyond 
making a virtual host that ran on port 81 and to listen on that same port. I 
don't have a copy of my config from my old FreeBSD host. :( My current virtual 
host config is pretty straight forward:

<VirtualHost *:81>
   ServerName mywebserver.example.com:81
   ServerAdmin usern...@example.com
   DocumentRoot /var/www/html
   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I can share other parts of my Apache configuration if that helps. I spent my 
work day yesterday looking at Apache documentation, Google searches and testing 
various things in my configuration to resolve this issue. 

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

Reply via email to