Bug 54366 - $sysconfdir/extra/httpd-dav.conf is not built based on $datadir
Summary: $sysconfdir/extra/httpd-dav.conf is not built based on $datadir
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4.3
Hardware: Other All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 16:03 UTC by Michael Felt
Modified: 2013-01-02 16:17 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Felt 2013-01-02 16:03:27 UTC
The default/example webdav configuration file substitutes $prefix rather than $datadir when creating .../extra/httpd-dav.conf file - unlike extra/{httpd-multilang-errordoc.conf|httpd-ssl.conf}, and .../httpd.conf.

==========
I am expecting them to all begin with /var/httpd - except where $datadir is specified.

<Layout AIX>
    prefix:        /opt/httpd
    exec_prefix:   /opt/httpd
    bindir:        ${exec_prefix}/bin
    sbindir:       ${exec_prefix}/sbin
    libdir:        ${exec_prefix}/lib
    libexecdir:    ${exec_prefix}/libexec
    mandir:        /usr/share/man
    datadir:       /var/httpd
    sysconfdir:    ${datadir}/etc
    installbuilddir: ${datadir}/build
    errordir:      ${datadir}/error
    htdocsdir:     ${datadir}/htdocs
    cgidir:        ${datadir}/cgi-bin
    iconsdir:      ${prefix}/icons
    manualdir:     ${prefix}/manual
    includedir:    ${prefix}/include
    localstatedir: /var/httpd
    runtimedir:    ${localstatedir}/run
    logfiledir:    ${localstatedir}/logs
    proxycachedir: ${localstatedir}/proxy
</Layout>
======

example (only looking at <Directory> directive as sample:
root@x104:[/var/httpd/etc/original/extra]grep Directory *
httpd-autoindex.conf:# a file matching those listed in the DirectoryIndex directive.
httpd-autoindex.conf:<Directory "/opt/httpd/icons">
httpd-autoindex.conf:</Directory>
httpd-dav.conf:<Directory "/opt/httpd/uploads">
httpd-dav.conf:</Directory>
httpd-manual.conf:<Directory "/opt/httpd/manual">
httpd-manual.conf:</Directory>
httpd-multilang-errordoc.conf:<Directory "/var/httpd/error">
httpd-multilang-errordoc.conf:</Directory>
httpd-ssl.conf:<Directory "/var/httpd/cgi-bin">
httpd-ssl.conf:</Directory>
httpd-userdir.conf:<Directory "/home/*/public_html">
httpd-userdir.conf:</Directory>
root@x104:[/var/httpd/etc/original/extra]cd ..
root@x104:[/var/httpd/etc/original]grep Directory *
httpd.conf:<Directory />
httpd.conf:</Directory>
httpd.conf:<Directory "/var/httpd/htdocs">
httpd.conf:</Directory>
httpd.conf:# DirectoryIndex: sets the file that Apache will serve if a directory
httpd.conf:    DirectoryIndex index.html
httpd.conf:    # need to provide a <Directory> section to allow access to
httpd.conf:<Directory "/var/httpd/cgi-bin">
httpd.conf:</Directory>
root@x104:[/var/httpd/etc/original]
Comment 1 Michael Felt 2013-01-02 16:15:16 UTC
Seems the issue is how "@@ServerRoot@@ is being parsed.
From ./docs/conf/extra/httpd-dav.conf
==
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
#                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
#                   mod_setenvif

# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.

DavLockDB "@@ServerRoot@@/var/DavLock"

Alias /uploads "@@ServerRoot@@/uploads"

<Directory "@@ServerRoot@@/uploads">
    Dav On

    AuthType Digest
    AuthName DAV-upload
    # You can use the htdigest program to create the password database:
    #   htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin
    AuthUserFile "@@ServerRoot@@/user.passwd"
    AuthDigestProvider file

    # Allow universal read-access, but writes are restricted
    # to the admin user.
    <RequireAny>
        Require method GET POST OPTIONS
        Require user admin
    </RequireAny>
</Directory>
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
#                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
#                   mod_setenvif

# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.

DavLockDB "@@ServerRoot@@/var/DavLock"

Alias /uploads "@@ServerRoot@@/uploads"

<Directory "@@ServerRoot@@/uploads">
    Dav On

    AuthType Digest
    AuthName DAV-upload
    # You can use the htdigest program to create the password database:
    #   htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin
    AuthUserFile "@@ServerRoot@@/user.passwd"
    AuthDigestProvider file

    # Allow universal read-access, but writes are restricted
    # to the admin user.
    <RequireAny>
        Require method GET POST OPTIONS
        Require user admin
    </RequireAny>
</Directory>
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
#                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
#                   mod_setenvif

# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.

DavLockDB "@@ServerRoot@@/var/DavLock"

Alias /uploads "@@ServerRoot@@/uploads"

<Directory "@@ServerRoot@@/uploads">
    Dav On

    AuthType Digest
    AuthName DAV-upload
    # You can use the htdigest program to create the password database:
    #   htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin
    AuthUserFile "@@ServerRoot@@/user.passwd"
    AuthDigestProvider file

    # Allow universal read-access, but writes are restricted
    # to the admin user.
    <RequireAny>
        Require method GET POST OPTIONS
        Require user admin
    </RequireAny>
</Directory>
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
#                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
#                   mod_setenvif

# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.

DavLockDB "@@ServerRoot@@/var/DavLock"

Alias /uploads "@@ServerRoot@@/uploads"

<Directory "@@ServerRoot@@/uploads">
    Dav On

    AuthType Digest
    AuthName DAV-upload
    # You can use the htdigest program to create the password database:
    #   htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin
    AuthUserFile "@@ServerRoot@@/user.passwd"
    AuthDigestProvider file

    # Allow universal read-access, but writes are restricted
    # to the admin user.
    <RequireAny>
        Require method GET POST OPTIONS
        Require user admin
    </RequireAny>
</Directory>
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
#                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
#                   mod_setenvif

# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.

DavLockDB "@@ServerRoot@@/var/DavLock"

Alias /uploads "@@ServerRoot@@/uploads"

<Directory "@@ServerRoot@@/uploads">
    Dav On

    AuthType Digest
    AuthName DAV-upload
    # You can use the htdigest program to create the password database:
    #   htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin
    AuthUserFile "@@ServerRoot@@/user.passwd"
    AuthDigestProvider file

    # Allow universal read-access, but writes are restricted
    # to the admin user.
    <RequireAny>
        Require method GET POST OPTIONS
        Require user admin
    </RequireAny>
</Directory>
===
Also, the httpd-dav.conf.in file is not being processed like the others are:

httpd-dav.conf:<Directory "@@ServerRoot@@/uploads">
httpd-dav.conf:</Directory>
httpd-dav.conf.in:<Directory "@@ServerRoot@@/uploads">
httpd-dav.conf.in:</Directory>

compared to:
httpd-manual.conf:<Directory "/opt/httpd/manual">
httpd-manual.conf:</Directory>
httpd-manual.conf.in:<Directory "@exp_manualdir@">
httpd-manual.conf.in:</Directory>

and
httpd-multilang-errordoc.conf:<Directory "/var/httpd/error">
httpd-multilang-errordoc.conf:</Directory>
httpd-multilang-errordoc.conf.in:<Directory "@exp_errordir@">
httpd-multilang-errordoc.conf.in:</Directory>
Comment 2 Michael Felt 2013-01-02 16:17:51 UTC
Seems my "paste" repeated a few times above. If possible, please edit and clean out excess text.