docker-library / docker-library/php
HTTP/2 support in php:7.2-apache-stretch image
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4k
- Forks
- 2k
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 1
Description
Hello,
I have faced issue with http/2 using php:7.2-apache-stretch image.
While running apache having such modules enabled:
a2enmod rewrite
a2enmod headers
a2enmod http2
a2enmod ssl
With configuration (http2.conf included in /etc/apache2/conf-enabled/000-http2.conf):
Protocols h2 h2c http/1.1
H2Push on
H2PushPriority * after
H2PushPriority text/css before
H2PushPriority image/jpeg after 32
H2PushPriority image/png after 32
H2PushPriority application/javascript interleavedSSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-A$'`
Apache says:
[http2:warn] [pid 65] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
After switching to mpm_event, another issue occurs:
[php7:crit] [pid 131:tid 140261273732288] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
AH00013: Pre-configuration failed
Thanks in advance for any help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior with the php:7.2-apache-stretch image and inspect the enabled Apache MPM, mod_http2, and PHP module setup described in the issue. The issue names no repository file or requested change; completion would require identifying and documenting a maintainer-approved compatible configuration or image fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, docker, php
- Domain
- backend, infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100