I am building a Drupal 8 project with https://github.com/wodby/docker4drupal , it works correctly, I can access the project without problems, login, attach files, etc...
But when I put a proxy in front, in this case a proxy set up with Apache does not let me login, as if it does not recognize the domain as valid or it does not recognize the cookies as good, but I can browse the web as an anonymous user without issue.
This is the virtual host that mounts the Apache proxy:
<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerName labo.local
ServerAdmin webmaster@localhost
ProxyPass "/" "http://labo.docker.localhost:8000/"
ProxyPassReverse "/" "http://labo.docker.localhost:8000/"
ErrorLog ${APACHE_LOG_DIR}/labo.error.log
CustomLog ${APACHE_LOG_DIR}/labo.access.log combined
</VirtualHost>
</IfModule>
And this is the settings I have for proxies in the settings.php file
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']);
$settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR |
\Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO |
\Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT;
$settings['trusted_host_patters'] = [
'^labo\.local$',
];
trusted_host_patters
should betrusted_host_patterns
.'^labo\.local$'
does not correspond tohttp://labo.docker.localhost
, or what would be the uri from which you make the proxy?