I am having an issue with the redirect that occurs with mod_dir when a trailing slash is missing. Our setup uses a load balancer listening on port 80 with multiple web servers that listen on non-standard ports like 8081.
When mod_dir issues the redirect it is attempting to redirect to domain.com:8081/path/ which of course times out.
I have tried setting UseCanonicalName On and specifying ServerName to include the port like so: domain.com:80 but it doesn't seem to have any effect.
My virtual host is as follows:
Listen 8081
<VirtualHost *:8081>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/domain_static
UseCanonicalName Off
ServerName domain.com:80
<Directory /var/www/domain_static>
Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/static-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/static-access.log combined
</VirtualHost>
What can I do to resolve this incorrect redirect behavior?
Hostheader sent to the port 8081 listener, or rewriting theLocationheader in the response. What software does it run? – Shane Madden Jul 24 '12 at 3:12