From 979e11881fbbfe7b5b182ca60914f620d30b71f4 Mon Sep 17 00:00:00 2001 From: Andriy Iun Date: Tue, 2 Feb 2021 14:54:23 +0100 Subject: [PATCH] Added apache setting to Dockerimage --- .docker/os2web/Dockerfile | 4 +++ .docker/os2web/apache/000-default.conf | 45 ++++++++++++++++++++++++++ .gitignore | 5 +-- sessions/.gitkeep | 0 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 .docker/os2web/apache/000-default.conf create mode 100644 sessions/.gitkeep diff --git a/.docker/os2web/Dockerfile b/.docker/os2web/Dockerfile index 7939182bd..fea057635 100644 --- a/.docker/os2web/Dockerfile +++ b/.docker/os2web/Dockerfile @@ -46,4 +46,8 @@ RUN echo ' /opt/drupal/web/sites/d chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync; \ chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync +# Adding custom apache configuration with PHP value and log settings. +COPY apache/000-default.conf /etc/apache2/sites-enabled/000-default.conf + +# Adding Drupal settings. COPY settings/prod.settings.php /opt/drupal/web/sites/default/ diff --git a/.docker/os2web/apache/000-default.conf b/.docker/os2web/apache/000-default.conf new file mode 100644 index 000000000..23868053a --- /dev/null +++ b/.docker/os2web/apache/000-default.conf @@ -0,0 +1,45 @@ + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + ServerName example.com + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + php_admin_value open_basedir /var/www/html:/usr/share/php + php_value include_path .:/var/www/html + + php_value log_errors 1 + php_value html_errors 0 + php_value display_errors 0 + php_admin_value error_reporting 1023 + php_value error_log /opt/drupal/logs/php.log + + php_value session.save_path /opt/drupal/sessions + php_admin_value upload_max_filesize 150 + php_admin_value upload_tmp_dir /tmp + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet + diff --git a/.gitignore b/.gitignore index a4b53c0ac..32500c139 100644 --- a/.gitignore +++ b/.gitignore @@ -45,9 +45,10 @@ *.sql *.sql.gz -# docker/docksal -logs/*.log +logs/* !logs/.gitkeep +sessions/* +!sessions/.gitkeep .docker/logs/* !.docker/logs/.gitkeep diff --git a/sessions/.gitkeep b/sessions/.gitkeep new file mode 100644 index 000000000..e69de29bb