>Number:         5746
>Category:       general
>Synopsis:       Troubles combining UseCanonicalName with DirectoryIndex
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 11 12:20:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Release:        1.3.11
>Organization:
apache
>Environment:
>From uname -a:
SunOS gsaserv7-m 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-250
>Description:
When I use the DirectoryIndex command to append index.html to a directory
name, the Apache server uses the host that is specified by Servername rather
than the canonical host name that was passed in.

So, for I type in a URL of:
http://canonical.name/my_directory/

I expect the apache server to serve up
http://canonical.name/my_direcotry/index.html

Instead, it tries to redirect me to
http://my.real.servername:8080/my_directory/
>How-To-Repeat:
Unfortunately, the real machines are behind firewalls here, so I can't give
you a real URL to try.  However, it should be fairly easy to test out by
creating a server with a valid ServerName directive and then set 
UseCanonicalName On
DirectoryIndex index.html

Finally, visit the webserver using a name other than what is set as the 
ServerName and view the info of that page to see what is the actual URL
that your browser is now pointing to...
>Fix:
I'll check out the ModRewrite rules as I believe that UseCanonicalName is
a convenient wrapper around the ModWrite package and see what I can do with
that.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 

Reply via email to