I have a lot of sites on nginx. And for each of them I need to correct:

listen 443 ssl; 

on

 listen 443 ssl http2; 

Is there a simpler method to enable http2 by default?

  • translate, please, the text of the question (by clicking edit below the text of the question) into Russian. at the same time, and put the question in order: so that it is clear what exactly you have difficulties with, what you tried to do, what mistakes you got, etc. etc. - aleksandr barakin
  • You mean that you have a lot of nginx configs, and you don’t want to add 'http2' in each hand? - Narnik Gamarnik
  • Well, this is already a matter of organizing the config, it was necessary to put all the same pieces before into a separate file (or files) and enable it :) - andreymal
  • one
    If yes, then there are more ways than, for example, like this: find ./ -iname "* .conf" -type f -exec sed -i 's / listen 443 ssl; / listen 443 ssl http2; / gi' {} \; Although I'm not sure what will work. But the bottom line. I think you understand, with the help of the bash script it does this in one line. - Narnik Gamarnik
  • one
    @NarnikGamarnik checked in, works) - andreymal

0