I have created a new CodeIgniter project and am in the process of setting up a container for it. However, after creating the container, I am encountering the following issue:
Forbidden
You don’t have permission to access this resource. Upon reviewing the logs, I noticed the following error message: AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by the Options directive. I am seeking assistance with this problem, as I am new to Docker.
my docker file
# Use the official PHP image as the base image
FROM php:7.4-apache
# Set the working directory inside the container
WORKDIR /var/www/html
# Copy the CodeIgniter project files to the container
COPY . .
# Install required PHP extensions and enable Apache modules
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN a2enmod rewrite
# Expose port 80 for Apache
EXPOSE 80