This repository has been archived on 2026-09-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2025-10-07 17:58:46 -07:00

29 lines
1.3 KiB
Docker

# Dockerfile (apache-static)
FROM httpd:2.4
LABEL maintainer="random@gmail.com"
# Enable required Apache modules for user directories and PHP
RUN sed -i \
-e 's/#LoadModule userdir_module/LoadModule userdir_module/' \
-e 's/#LoadModule vhost_alias_module/LoadModule vhost_alias_module/' \
-e 's/#LoadModule rewrite_module/LoadModule rewrite_module/' \
-e 's/#Include conf\/extra\/httpd-userdir.conf/Include conf\/extra\/httpd-userdir.conf/' \
/usr/local/apache2/conf/httpd.conf
# Add custom configuration for user directories
COPY httpd-userdir.conf /usr/local/apache2/conf/extra/httpd-userdir.conf
# Create example student org directories with basic content
RUN mkdir -p /home/studentorg1/public_html && \
echo "<h1>Welcome to Student Org 1's OCF Page</h1><p>This is a test page.</p>" > /home/studentorg1/public_html/index.html && \
mkdir -p /home/studentorg2/public_html && \
echo "<h1>Welcome to Student Org 2's OCF Page</h1><p>This is a test page.</p>" > /home/studentorg2/public_html/index.html && \
mkdir -p /home/studentorg3/public_html && \
echo "<h1>Welcome to Student Org 3's OCF Page</h1><p>This is a test page.</p>" > /home/studentorg3/public_html/index.html
# Set proper ownership
RUN chown -R www-data:www-data /home
EXPOSE 80