Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to enable HTTP/2 support for Nginx in Plesk?
Answer
To enable HTTP/2 support for Nginx:
- Connect to the server using SSH
-
Enable HTTP/2 with the following command:
# plesk bin http2_pref enable
Note: During this step nginx web server will be tuned to use the TLS protocol with modern and secure ciphers, the whole web server configuration will be rebuilt, and all client's sites with 'SSL Support' will be moved to HTTP/2.
Note: HTTP/2 can be disabled with the following command:
# plesk bin http2_pref disable
Note: HTTP/2 support is a server-wide setting and cannot be set for specific domains only
Comments
4 comments
When using the "Enable HTTP/2" button of the Security Advisor, is this the same command which is executed in the background?
Additionally, can you elaborate in more detail which configuration changes this command entails?
From what I read:
- change ssl_ciphers and ssl_protocols in /etc/nginx/conf.d/ssl.conf
- for every (NGINX-enabled?) host, nginx.conf will be updated and probably the https parameter will be added to the listen directive.
Open questions:
- Which parameters will be updated in detail for the individual host configurations?
- Does this affect any other configuration details (e.g., disable Proxy mode regarding Apache use etc.)?
Fun fact: when enabling HTTP/2 via the Security Advisor, TLS1 gets enabled again (so TLS1, TLS1.1, and TLS1.2 will be active while only the last two were active before)
@b_p
Yes, it is the same command that is launched when enabling HTTP/2 via Security Advisor extension. TLS1 is also enabled when running the command from CLI, according to my tests (Latest Plesk Onyx 17.8).
You are right, SSL_ciphers are added in the server-wide ssl.conf file, and http2 parameter is added to the listen directive in nginx.conf files for websites with SSL support enabled.
No further differences are spotted in configuration files, including nginx proxy mode - its configuration remains untouched.
I use the same commands above and follow all the instructions but this didn't work for me any help would be appreciated thanks
Hello, @Manish Pandey
Could you provide us with the steps on how did you tested that HTTP/2 is enabled or not?
Please also note, that this article for Plesk for Linux. About HTTP/2 in Plesk for Windows, please refer to this article: https://support.plesk.com/hc/en-us/articles/115002410309-HTTP-2-in-Plesk-for-Windows-Server
Please sign in to leave a comment.