mzazon/php-apache-mysql-containerized

is it possible to create virtual hosts for apache config?

Opened this issue · 1 comments

I have tried to create some folders in public_html and made some changes to apache config, but it haven't worked

Did you restart your container after making changes? Additionally, I put my config in a volume so I can make changes to it without having to rebuild the container.

docker-compose.yml

  apache:
    volumes:
      - /var/containers/public_html:/var/www/html
      - /var/containers/apache/conf:/etc/apache2

And in the apache Dockerfile I changed the last line like this.

RUN echo "Include /etc/apache2/my_config.conf" >> /usr/local/apache2/conf/httpd.conf

The danger of this is if /etc/apache2/my_config.conf doesn't exist or has errors apache wont start.