Skip to content

Commit

Permalink
enh: Add image to run tests against webdav provided by apache
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jan 31, 2024
1 parent bd5dd12 commit 3dd2fe1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions webdav-apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM httpd:alpine

# Create webdav directory
RUN mkdir -p /usr/local/apache2/webdav; chown www-data /usr/local/apache2/webdav
# Copy config
COPY ./webdav.conf /usr/local/apache2/conf/webdav.conf
# Add password file
RUN /usr/local/apache2/bin/htpasswd -cb /usr/local/apache2/webdav.password test pass
RUN chown root:www-data /usr/local/apache2/webdav.password
RUN chmod 640 /usr/local/apache2/webdav.password
# Enable config
RUN echo "Include conf/webdav.conf" >> /usr/local/apache2/conf/httpd.conf
19 changes: 19 additions & 0 deletions webdav-apache/webdav.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

Alias /webdav /usr/local/apache2/webdav

<Location /webdav/>
DAV on
Options +Indexes
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache2/webdav.password
Require valid-user
</Location>

<Directory /usr/local/apache2/webdav>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

0 comments on commit 3dd2fe1

Please sign in to comment.