You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Bill Nowicki <BN...@Omneon.COM> on 1999/09/16 02:43:15 UTC

config/5016: relative DocumentRoot support

>Number:         5016
>Category:       config
>Synopsis:       relative DocumentRoot support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Sep 15 17:50:01 PDT 1999
>Last-Modified:
>Originator:     BNowicki@Omneon.COM
>Organization:
apache
>Release:        1.3.6
>Environment:
Windows NT 4.0 With Microsoft Visual C 6.0
>Description:
We were hoping to have a portable httpd.conf file, which would work no matter where people installed it, including using a relative path to the documents being served. Only absolute paths work for DocumentRoot. Is this a bug or a feature?
>How-To-Repeat:
Use a relative path in the DocumentRoot directive in the config file.
>Fix:
Adding one line works for simple sub-directories, (e.g. "script") but not for what I really want, a sibliing directory, e.g. "../script".


*** http_core.c 1999/07/01 23:09:58     1.1
--- http_core.c 1999/09/16 00:19:33
***************
*** 1003,1008 ****
--- 1003,1009 ----
          return err;
      }

+     arg = ap_server_root_relative(cmd->pool, arg);
      arg = ap_os_canonical_filename(cmd->pool, arg);
      if (!ap_is_directory(arg)) {
        if (cmd->server->is_virtual) {
***************
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> 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!     ]