Skip to content

Instantly share code, notes, and snippets.

@ssi-anik
Created August 30, 2017 12:15
Show Gist options
  • Select an option

  • Save ssi-anik/d0b095a03b8a29601256c1737bef510a to your computer and use it in GitHub Desktop.

Select an option

Save ssi-anik/d0b095a03b8a29601256c1737bef510a to your computer and use it in GitHub Desktop.
apache-docker-php
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/html/public >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
version: '2'
services:
php:
ports:
- 8009:80
build: .
expose:
- 9000
volumes:
- .:/var/www/html
FROM php:7.1.8-apache
RUN apt-get update && apt-get install -y mcrypt
# Configuring Apache
ADD apache/apache2.conf /etc/apache2/sites-available/000-default.conf
RUN /bin/ln -sf ../sites-available/000-default.conf /etc/apache2/sites-enabled/000-default.conf
# Enable rewrite module
RUN a2enmod rewrite
WORKDIR /var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment