Browse Source

Added webdav apache test docker

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/webdav-apache-php7.0-1^2
Roeland Jago Douma 2 years ago
parent
commit
2091cf54b7
No account linked to committer's email address
2 changed files with 44 additions and 0 deletions
  1. 29
    0
      webdav-apache-php7.0/Dockerfile
  2. 15
    0
      webdav-apache-php7.0/webdav.conf

+ 29
- 0
webdav-apache-php7.0/Dockerfile View File

@@ -0,0 +1,29 @@
FROM nextcloudci/php7.0:php7.0-7

RUN apt-get update
RUN apt-get install -y apache2 apache2-utils
RUN a2enmod dav dav_fs
RUN a2dissite 000-default

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_RUN_DIR /var/run/apache2

RUN mkdir -p /var/lock/apache2; chown www-data /var/lock/apache2
RUN mkdir -p /var/webdav; chown www-data /var/webdav

ADD webdav.conf /etc/apache2/sites-available/webdav.conf
RUN a2ensite webdav

RUN htpasswd -cb /etc/apache2/webdav.password test pass
RUN chown root:www-data /etc/apache2/webdav.password
RUN chmod 640 /etc/apache2/webdav.password

RUN apt-get autoremove -y && \
apt-get autoclean && \
apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*


+ 15
- 0
webdav-apache-php7.0/webdav.conf View File

@@ -0,0 +1,15 @@
Alias /webdav /var/webdav/
<Location /webdav/>
DAV on
Options +Indexes
AuthType Basic
AuthName "webdav"
AuthUserFile /etc/apache2/webdav.password
Require valid-user
</Location>

<Directory /var/webdav/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

Loading…
Cancel
Save