Skip to content

Commit

Permalink
Added apache setting to Dockerimage
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyun committed Feb 2, 2021
1 parent a75d3b0 commit 979e118
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .docker/os2web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /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/
45 changes: 45 additions & 0 deletions .docker/os2web/apache/000-default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<VirtualHost *:80>
# 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
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
*.sql
*.sql.gz

# docker/docksal
logs/*.log
logs/*
!logs/.gitkeep
sessions/*
!sessions/.gitkeep

.docker/logs/*
!.docker/logs/.gitkeep
Expand Down
Empty file added sessions/.gitkeep
Empty file.

0 comments on commit 979e118

Please sign in to comment.