Loading Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ ADD docker/php.conf ${PHP_CONF_DIR}/fpm/conf.d/ose.ini ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/ose.conf ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/ose-ssl.conf #ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/ose.conf ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/ose.conf RUN a2ensite ose ose-ssl && \ service php7.0-fpm reload docker-compose.yml +2 −3 Original line number Diff line number Diff line version: '2' services: octopus: ose: container_name: ose-container build: context: . dockerfile: Dockerfile ports: - "8080:80" - "8443:8443" - "8443:443" volumes: - .:/var/www/ose - /tmp:/tmp working_dir: /var/www/ose docker/apache-ports.conf +1 −1 Original line number Diff line number Diff line Listen 80 Listen 8443 No newline at end of file Listen 443 docker/apache-site-ssl.conf +30 −17 Original line number Diff line number Diff line <VirtualHost *:8443> ServerName ose.localhost #ServerAlias octopass.localhost <VirtualHost *:443> ServerName localhost DocumentRoot /var/www/ose/public Header always set Strict-Transport-Security "max-age=15768000;includeSubdomains;" SetEnv APPLICATION_ENV "development" RewriteEngine On <Directory /var/www/ose/public> DirectoryIndex index.php AllowOverride All Require all granted </Directory> <IfModule proxy_fcgi_module> <FilesMatch ".+\.ph(ar|p|tml)$"> SetHandler "proxy:unix:/var/run/php7.0-fpm-ose.sock|fcgi://localhost/" </FilesMatch> </IfModule> SSLEngine on SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined #LogLevel debug </VirtualHost> docker/apache-site.conf +10 −15 Original line number Diff line number Diff line <VirtualHost *:80> ServerName ose.localhost ServerAlias ose.localhost ServerName localhost DocumentRoot /var/www/ose/public SetEnv APPLICATION_ENV "development" <Directory /var/www/ose/public> DirectoryIndex index.php AllowOverride All Require all granted </Directory> RewriteEngine On <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)?$ https://%{SERVER_NAME}:8443$1 [R=301,L] </IfModule> Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;" ### Redirection en HTTPS RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [L,R] </VirtualHost> Loading
Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ ADD docker/php.conf ${PHP_CONF_DIR}/fpm/conf.d/ose.ini ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/ose.conf ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/ose-ssl.conf #ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/ose.conf ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/ose.conf RUN a2ensite ose ose-ssl && \ service php7.0-fpm reload
docker-compose.yml +2 −3 Original line number Diff line number Diff line version: '2' services: octopus: ose: container_name: ose-container build: context: . dockerfile: Dockerfile ports: - "8080:80" - "8443:8443" - "8443:443" volumes: - .:/var/www/ose - /tmp:/tmp working_dir: /var/www/ose
docker/apache-ports.conf +1 −1 Original line number Diff line number Diff line Listen 80 Listen 8443 No newline at end of file Listen 443
docker/apache-site-ssl.conf +30 −17 Original line number Diff line number Diff line <VirtualHost *:8443> ServerName ose.localhost #ServerAlias octopass.localhost <VirtualHost *:443> ServerName localhost DocumentRoot /var/www/ose/public Header always set Strict-Transport-Security "max-age=15768000;includeSubdomains;" SetEnv APPLICATION_ENV "development" RewriteEngine On <Directory /var/www/ose/public> DirectoryIndex index.php AllowOverride All Require all granted </Directory> <IfModule proxy_fcgi_module> <FilesMatch ".+\.ph(ar|p|tml)$"> SetHandler "proxy:unix:/var/run/php7.0-fpm-ose.sock|fcgi://localhost/" </FilesMatch> </IfModule> SSLEngine on SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined #LogLevel debug </VirtualHost>
docker/apache-site.conf +10 −15 Original line number Diff line number Diff line <VirtualHost *:80> ServerName ose.localhost ServerAlias ose.localhost ServerName localhost DocumentRoot /var/www/ose/public SetEnv APPLICATION_ENV "development" <Directory /var/www/ose/public> DirectoryIndex index.php AllowOverride All Require all granted </Directory> RewriteEngine On <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)?$ https://%{SERVER_NAME}:8443$1 [R=301,L] </IfModule> Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;" ### Redirection en HTTPS RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [L,R] </VirtualHost>