diff --git a/templates/d8_settings.php.jinja2 b/templates/d8_settings.php.jinja2 index 361616ebbd5ef59fa1e03c99d419cc5392eed013..94b50a19f531a7eaa68e0edbe5d3d2005526a61c 100644 --- a/templates/d8_settings.php.jinja2 +++ b/templates/d8_settings.php.jinja2 @@ -131,6 +131,15 @@ if (file_exists('modules/contrib/redis/redis.info.yml') && extension_loaded('red } +{% if item.mailhog|default(false) %} +$config['smtp.settings']['smtp_host'] = 'mailhog'; +$config['smtp.settings']['smtp_hostbackup'] = ''; +$config['smtp.settings']['smtp_port'] = '1025'; +$config['smtp.settings']['smtp_protocol'] = 'standard'; +$config['smtp.settings']['smtp_username'] = ''; +$config['smtp.settings']['smtp_password'] = ''; +{% endif %} + if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; } diff --git a/templates/vhost.conf b/templates/vhost.conf index b0a067f90baf033e061c4c0e1ddb1eaec6ff40c7..d3f21a569adfe85ec978a07b7e3c7a57471fb7bd 100644 --- a/templates/vhost.conf +++ b/templates/vhost.conf @@ -41,6 +41,21 @@ Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" +{% if drupal_domain.mailhog|default(false) %} +{% if drupal_domain.apache_auth is defined and drupal_domain.apache_auth.active|default('true') == 'true' %} + <Location /mailhog/> + AuthType {{ drupal_domain.apache_auth.type }} + AuthName "{{ drupal_domain.apache_auth.name }}" + AuthUserFile {{ webRoot }}/passwords/{{ drupal_domain.apache_auth.user }} + Require user {{ drupal_domain.apache_auth.user }} + </Location> +{% endif %} + ProxyPass "/mailhog/api/v2/websocket" ws://localhost:8025/api/v2/websocket + ProxyPassReverse "/mailhog/api/v2/websocket" ws://localhost:8025/api/v2/websocket + ProxyPass /mailhog/ http://localhost:8025/ + ProxyPassReverse /mailhog/ http://localhost:8025/ +{% endif %} + {% if drupal.docker|default(false) %} ServerSignature Off