Skip to content

Commit

Permalink
Disable UseCanonicalName
Browse files Browse the repository at this point in the history
It turns out that, with this on, a request for a directory sans slash would cause Apache to redirect to the domain name specified in the `ServerName` directive. This was annoying if the request was sent to a different host name. Such was the case, I noticed, on my Mac, where the canonical name was set to "benedict.local" but I just used "localhost" in my browser. I'd click the "Cancel" link in a destination action profile and be confronted with the login page. This is because that link requested `/admin/profile/dest?id=1234` and mod_dir would redirect it to `/admin/profile/dest/?id=1234`, and in that redirect, it would use the canonical server name rather than the requested server name. By turning off `UseCanonicalName`, we get mod_dir to redirect to the requested host name, instead, thus avoiding that particular issue.
  • Loading branch information
theory committed Jan 27, 2010
1 parent ee07d5a commit 638e34d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/httpd.conf
Expand Up @@ -31,7 +31,7 @@ ErrorLog /usr/local/apache/logs/error_log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\" \"%v:%p\"" combined
CustomLog /usr/local/apache/logs/access_log combined
TypesConfig /usr/local/apache/conf/mime.types
UseCanonicalName On
UseCanonicalName Off
HostNameLookups Off
Timeout 30

Expand Down
8 changes: 8 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -93,6 +93,14 @@ Destination distribution actions are editable again (Bug # 123). [David]
Fixed the F<favicon.ico> redirect so that it points to a full URL, not just a
URI path. [David]

=item *

Clicking the "Cancel" button in a server or action profile no longer redirects
to the login screen when the hostname to which the request is sent is
different than the hostname in the configuration file. This mainly effected
development and evaluation installs. Thanks to Adam Prime for identifying the
solution (disabling C<UseCanonicalName>). [David]

=back

=head1 Version 1.11.2 (2009-11-14)
Expand Down

0 comments on commit 638e34d

Please sign in to comment.