Plesk Linux: Enable NGINX and HTTP/2

Support Wissensdatenbank

Du bist hier:

Follow these instructions to enable Nginx with HTTP/2 and ALPN on Plesk for Linux. These instructions are designed to activate NGINX as quickly as possible and without major interruption. The execution is at your own risk. As with all instructions, you should perform a full server backup first.

    1. Disable the debug mode of Plesk/opt/psa/admin/conf/panel.ini
      ; Enable debug mode (do not use in production environment)
      ;enabled = off

    2. In Plesk under ‘Tools & Settings => Apache Webserver’ set the following values:Restart

      Apache interval to 600000 seconds
      module remoteip

    3. In Plesk under ‘Tools & Settings => IP Addresses’ click on Reread IP.Any IP problems must be solved!
      Open the SSH console and check with the command below if all displayed IP addresses match the Plesk output.
      # ifconfig

    4. Execute the following SSH command (depending on the server load you can also increase the value to 64000
      )/usr/local/psa/admin/sbin/websrv_ulimits -s 32000This
      process can take several hours!

    5. Change the file /etc/security/limits.conf
      :root soft nofile 65535root
      hard nofile 65535Logoff the server and log on again and execute the following command:
      # ulimit -n65535If

      the value is not accepted, a complete server restart is required. Check whether the value was then transferred

    6. install NGINX via Plesk under ‘Tools & Settings => Updates and Upgrade => Add / Remove Components => Web hosting => Nginx web server and reverse proxy server’

    7. Check for old configuration files before migrating to the new datacenter and remove the listed files
      :# grep -r ‘62.146.’ /var/www/vhosts/system/*/conf/*.conf#
      grep -r ‘62.146.’ /etc/nginx/plesk.conf.d/

    8. Run the following SSH commands
      :# /usr/local/psa/admin/sbin/nginxmng –status#
      /usr/local/psa/admin/sbin/nginxmng –enableThis
      process can take several hours!

    9. Check with the following command whether the value set under point 4 was taken over
      :grep ‘Max open files’ /proc/$(cat /var/run/

    10. Change the Apache2.conf file. You need to replace the %h with %a
      :LogFormat “%h %l %u %t \”%r\” %>s %O \”%{Referer}i\”

      \”%{User-Agent}i\”” combinedLogFormat
      “%a %l %u %t \”%r\” %>s %O \”%{Referer}i\””

      \”%{User-Agent}i\”” combined

    11. Now activate http2 from NGINX#
      plesk bin http2_pref enableThis
      process takes as long as step 7. Even if Plesk has already indicated that this is done, all configuration files are adjusted in the background.
      As soon as no more changes are written to the subfolders, the process is completed. The subfolders with all configurations are/etc/apache2/plesk.conf.d/etc/nginx/plesk

    12. After you have waited long enough (advantageous 12 hours), you can execute the following command to test NGINX
      :# nginx -tNo
      error must be displayed now, otherwise something went wrong. Then you should interrupt now and contact us

    13. Now restart Apache2 and NGINX by hand
      :# service apache2 reload#
      service nginx reloadIf
      the reload
      work without problems, you can then issue the following commands:# service apache2 restart#
      service nginx restart

    14. In Plesk under ‘Tools & Settings => Apache Webserver’ set the following values:Apache
      restart interval to 60 seconds

    15. Tip: You can use our nginx.conf file. The file can be found at /etc/nginx/nginx.conf.
      You can download our template from the following link: => Support => Downloads => Rootserver => Plesk => Linux Then
      check the configuration and restart Nginx:# nginx -t# nginx

    16. Now check HTTP/2 with the following link:



If you encounter problems we recommend to disable NGINX
:# /usr/local/psa/admin/sbin/nginxmng –disable


War dieser Artikel hilfreich?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Brauchst du Hilfe?
Related Post