Initial commit
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
# Use an official PHP image with Apache
|
||||
FROM php:7.4-apache
|
||||
|
||||
# Install Vim (optional)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y vim && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN htpasswd -nb davuser davuser > /var/www/.htpasswd
|
||||
|
||||
# Copy your PHP application into the default Apache document root
|
||||
COPY ./public-html/ /var/www/html/
|
||||
COPY ./webdav/ /var/www/webdav/
|
||||
|
||||
RUN chown -R root:www-data /var/www/
|
||||
|
||||
# Copy SSL certificate and key
|
||||
COPY ssl/localhost.crt /etc/ssl/certs/localhost.crt
|
||||
COPY ssl/localhost.key /etc/ssl/private/localhost.key
|
||||
|
||||
# Copy the custom Apache virtual host config
|
||||
COPY conf/my-httpd-vhosts.conf /etc/apache2/sites-available/my-ssl.conf
|
||||
COPY conf/webdav.conf /etc/apache2/sites-available/webdav.conf
|
||||
|
||||
# Enable SSL module, configure Apache for PHP support, and enable our SSL site configuration
|
||||
RUN a2enmod ssl && \
|
||||
a2enmod rewrite && \
|
||||
a2enmod dav && \
|
||||
a2enmod dav_fs && \
|
||||
a2enmod dav_lock && \
|
||||
a2dissite 000-default default-ssl && \
|
||||
a2ensite my-ssl && \
|
||||
a2ensite webdav && \
|
||||
apachectl configtest
|
||||
|
||||
Reference in New Issue
Block a user