-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HTTP/2 support in php:7.2-apache-stretch image #558
Comments
Is Apache a hard requirement for your deployment? I think the easiest way to use HTTP/2 with this image today would be to instead use the FPM variants and connect them via NGINX instead (or another load balancer / reverse proxy). |
Apache is not a hard requirement on my production. I was just curious if the problem stays on my side. I remember that while ALPN was not a hard requirement for HTTP/2 then everything worked fine with your docker images. |
I'm currently working on setting up HTTP/2 on the I believe the issue you have is because you're not using PHP FPM with fastCGI as it seems to be a requirement. And that's where I'm stuck right now, as there's no I was thinking of just installing the php7.1-fpm package via I wish there was a |
I'm not sure why you'd want to use Apache and FPM together, but even more confused why you'd want the two things running in the same container? Typically I see folks using FPM in conjunction with something like NGINX to do the FastCGI handshaking/request handoff, but it should be relatively simple to configure Apache to do something similar (https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html). The Apache variants of this image use |
The combo Apache + PHP-FPM is quite popular for running web servers. It's probably not the best, but I believe it performs better than mod_php. Running Apache + PHP-FPM in one container might be a weird idea, but it's the only solution for having an Apache + PHP 2-in-1 container that's HTTP/2 compatible. I believe I'm not the only one with that need (dpfaffenbauer/pimcore-docker#5 is one example). |
I'm not sure if this helps, but I made a all-in-one container with debian:stretch, php7.2 and mod_http2: |
Updating to use a more modern mpm for Apache would be a good idea anyways per https://serverfault.com/a/383634/93416 Or at least compiling this PHP to be thread-safe so we could switch mpm's ourselves. Interesting that PHP themselves say "don't": But I'd definitely be interested in PHP being compiled thread-safe, even if this container's default mpm remains prefork. Formal request:Please enable thread safety. UPDATE: |
See especially #742 (comment); there's a nontrivial performance hit for enabling ZTS. |
Is there any update on this? Still no HTTP/2 support in sight in June 2020? cc @tianon |
Still no HTTP/2 support in sight in February 2021? 💔💔💔😭😭😭 |
The limitations which prevent us from enabling it by default still unfortunately apply:
Using PHP with Apache and |
Hello,
I have faced issue with http/2 using php:7.2-apache-stretch image.
While running apache having such modules enabled:
With configuration (http2.conf included in /etc/apache2/conf-enabled/000-http2.conf):
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.
The text was updated successfully, but these errors were encountered: