[ale] WebDAV configuration? (maybe slightly OT)

Jeff Layton laytonjb at att.net
Thu Apr 24 08:57:22 EDT 2014


Good morning,

I have a question that might be more topical than my cygwin
question (I hope). My goal is to set up WebDAV on a Linux
server so that each user can get to their own files. If I'm user
"layton" I want to get to /home/layton with no one else
getting to the files that doesn't have permission.

I've gotten WebDAV working on the server (CentOS 6.5) but
I've got a couple of questions about further configuration.

1. I have to set up a user/pwd using htpasswd. Is there a
way to get httpd to use the server user/pwd? (not a huge
deal but just for convience). Right now, I define a user name
and pwd for http that is different than the system user/pwd
(htpasswd -c /etc/httpd/webdav.users.pwd layton).


2. Right now I have /etc/httpd/conf.d/webdav.conf defined as,

  <IfModule mod_dav.c>
     LimitXMLRequestBody 131072

     Alias /webdav "/home/httpd/webdav"
     <Directory /home/httpd/webdav>
         Dav On
         Options +Indexes
         IndexOptions FancyIndexing
         AddDefaultCharset UTF-8
         AuthType Basic
         AuthName "WebDAV Server"
         AuthUserFile /etc/httpd/webdav.users.pwd
         Require valid-user
         Order allow,deny
         Allow from all
     </Directory>
  </IfModule>


This means that people get dumped to /home/http/webdav.
I want the ability to do something like:


<IfModule mod_dav.c>
     LimitXMLRequestBody 131072

     Alias /webdav/layton "/home/layton"
     <Directory /home/layton>
         Dav On
         Options +Indexes
         IndexOptions FancyIndexing
         AddDefaultCharset UTF-8
         AuthType Basic
         AuthName "WebDAV Server"
         AuthUserFile /etc/httpd/webdav.users.layton.pwd
         Require valid-user
         Order allow,deny
         Allow from all
     </Directory>

     Alias /webdav/susy "/home/susy"
     <Directory /home/susy>
         Dav On
         Options +Indexes
         IndexOptions FancyIndexing
         AddDefaultCharset UTF-8
         AuthType Basic
         AuthName "WebDAV Server"
         AuthUserFile /etc/httpd/webdav.users.susy.pwd
         Require valid-user
         Order allow,deny
         Allow from all
     </Directory>
  </IfModule>


I define a different password file for each user (a pain
but the user count isn't too large). Then when the user
goes to the URL for their home directory such as
/webdav/layton it will use the correct pwd file and connect
the user to their home directory.

When I try restarting http I get the following error:

Starting httpd: [Thu Apr 24 08:41:18 2014] [warn] The Alias directive in 
/etc/httpd/conf.d/webdav.conf at line 18 will probably never match 
because it overlaps an earlier Alias.

(irnoge the line name - it may not match the file but it
refers to the second Alias in the webdav.conf file).


Any suggestions? I'll take pointers on where to ask the questions
as well (I've been googling and looking for places to ask the
question with not luck at this point).

Thanks!

Jeff




More information about the Ale mailing list