Commit d4b243a8 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Docker: Renommage de fichiers de config apache, ajout config HTTPS.

parent 2f11af02
Loading
Loading
Loading
Loading
+9 −4
Changes for Dockerfile.php7.dev: 9 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \
        libxml2-dev \
        make \
        netcat-openbsd \
        ssl-cert \
        subversion \
        unzip \
        vim \
@@ -61,11 +62,15 @@ ENV LD_LIBRARY_PATH /usr/local/instantclient

# Config PHP.
ADD docker/php.conf /usr/local/etc/php/conf.d/webapp.ini
#ADD docker/opcache.ini /usr/local/etc/php/conf.d/01-opcache.ini
#ADD docker/php-opcache.ini /usr/local/etc/php/conf.d/01-opcache.ini

# Configuration et activation du site Apache
ADD docker/apache.conf /etc/apache2/sites-available/webapp.conf
RUN a2enmod rewrite && a2ensite webapp
# Configuration et activation des sites Apache
ADD docker/apache-ports.conf    /etc/apache2/ports.conf
ADD docker/apache-site.conf     /etc/apache2/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf /etc/apache2/sites-available/webapp-ssl.conf
RUN a2enmod rewrite ssl && \
    a2ensite webapp && \
    a2ensite webapp-ssl

# Install Composer.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+2
Changes for docker/apache-ports.conf: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
Listen 80
Listen 443
+20
Changes for docker/apache-site-ssl.conf: 20 added lines, 0 removed lines.
Original line number Diff line number Diff line
<VirtualHost *:443>
     ServerName sygal-pp.unicaen.fr
     DocumentRoot /var/www/html/sygal/public

     RewriteEngine On

     <Directory /var/www/html/sygal/public>
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
     </Directory>

     SSLEngine on
     SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
     SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
     #LogLevel debug
</VirtualHost>
+8 −3
Changes for docker/apache-site.conf: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
<VirtualHost *:80>
     ServerName localhost
     DocumentRoot /sygal/public
     ServerName sygal-pp.unicaen.fr
     DocumentRoot /var/www/html/sygal/public

     RewriteEngine On

     <Directory /sygal/public>
     ### Redirection en HTTPS
     RewriteCond %{SERVER_PORT} !^443$
     RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [L,R]

     <Directory /var/www/html/sygal/public>
         DirectoryIndex index.php
         AllowOverride All
         Require all granted

File moved.