-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heroku - AH00534: apache2: Configuration error: More than one MPM loaded. #293
Comments
We had to switch to the buildpack, no time to sort this. |
I was investigating this issue today with @fresswolf The "php" docker image is enabling the module "mpm_prefork", and thus creates the file We opened a support ticket with Heroku about it. Steps to reproduce:
$ docker build -t test .
$ docker run --rm test
/etc/apache2/mods-enabled/:
total 0
The files are magically there again. |
@njam, any response from Heroku on this issue? |
Yes! Actually they developed a fix, but haven't rolled it out globally yet.
|
Thank you for quick response! |
It doesn't work in my case. On applying the new fix, it gives me:
|
https://devcenter.heroku.com/articles/container-registry-and-runtime#dockerfile-commands-and-runtime |
@rharish101 did you find a fix? |
Yeah, I just had to listen to HTTP traffic on $PORT, as pointed out by njam. |
How exactly did you do this? I tried something like: RUN sed -i 's/Listen 80/Listen $PORT/g' /etc/apache2/ports.conf but this does not work (it just changes 80 to $PORT in ports.conf). |
@arniwesth It seems like the
|
@rharish101 Thx for your reply. Unfortunately, it does not make a difference. I gave up and ditched Docker for this app. |
The heroku I was able to create a shell script to use in #!/usr/bin/env bash
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf
apache2-foreground "$@" FROM php:7.3-apache-buster
COPY ./docker/run-apache2.sh /usr/local/bin/
CMD [ "run-apache2.sh" ] |
Thanks @travismiller for the example! It was super useful. We ended up with the following script: #!/usr/bin/env bash
# https://github.com/docker-library/wordpress/issues/293
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf
/usr/local/bin/docker-entrypoint.sh apache2-foreground By using the docker-entrypoint.sh, php files are copied to /var/www/html when starting. It was useful in our case. |
This worked for me
|
* upgrade php image (could that fix heroku deployment?) * try solution from github issue docker-library/wordpress#293 (comment)
in my case i get : /usr/local/bin/docker-php-entrypoint: 9: exec: labs:enable: not found |
When I create a simple Dockerfile:
It runs just fine locally and everything is nice and dandy but pushing it to Heroku fails when apache is starting.
The container dies to fast to go in and have a look at which modules are actually loaded.
Any ideas? Does anyone knows which modules are actually needed or what can fails in the scripts here.
Note that before the error the message
Complete! WordPress has been successfully copied to /var/www/html
is printed which seems to indicate the actual wp setup is successful.The text was updated successfully, but these errors were encountered: