I'm using webserver-type: apache-fpm
with ddev and need to enable a module. How do I do that?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use a2enmod
in the web container and then apachectl graceful
to restart apache to pick up the changes.
So ddev ssh
and then a2enmod headers && apache2ctl graceful
(if you were enabling the "headers" module)
Using ddev exec: ddev exec "a2enmod headers && apache2ctl graceful"
Using a post-start hook:
hooks:
post-start:
- exec: a2enmod headers && apache2ctl graceful