Http3 Nginx temnplates directives

Hello,

I am interested in getting http3 working (I only use nginx+php fpm), and I use the templates of this tutto:

I install the domain, select the template and everything is ok. I do an external http3 test and everything is ok: https://http3check.net/

Perfect!!!

Now I install Wordpress, and http3 stops working. I notice that the template changes itself to “Wordpress”, so I select again the template for http3, but then, the web does not work. Wordpress stops working.

YES, I’m a noob, can anyone tell me what I’m doing wrong?

thanks

Create a new template based on wordpress (just copy from wordpress.tpl/stpl to wordpress-http3.tpl/stpl) and adjust the related changes there. Then you can set wordpress-http3 as template and both should work.

Thanks for the information.

I think I know how to copy the content of the wordpress template, I also know how to create a new wordpress template http3. The problem is that I don’t know what changes I should add hehehehehe, all this is actually very complicated for me (I recently learned to use “nano” as a text editor hehehe).

Use these commands to create the new template and use it on your web domain (replace YourUser and YourDomain with the actual data):

cd /usr/local/hestia/data/templates/web/nginx/php-fpm/
cp wordpress.tpl wordpress-http3.tpl
cp wordpress.stpl wordpress-http3.stpl
sed -i '/^server {$/a \\tlisten      %ip%:%web_ssl_port% quic;' wordpress-http3.stpl
sed -i '/if (\$anti_replay = 425) { return 425; }/a \\n\tadd_header Alt-Svc '\''h3=":$server_port"; ma=86400'\'';' wordpress-http3.stpl
v-change-web-domain-tpl YourUser YourDomain wordpress-http3 yes

Instead of running the last command v-change-web-domain-tpl, you can edit the web domain through the Web UI by changing the template used by your site there.

4 Likes

Thanks a lot :smiling_face_with_three_hearts:

1 Like

This has worked, but now it does not work, I do not know why.

I have repeated the process again, but it still does not work.

Do I need to make any changes?

Did you add a new domain using the same template?

I am doing a new, clean installation. Nginx (without apache), due to a hosting change.

I added the domain.
Installed Wordpress.
I opened the console and put the indicated commands
I entered the domain and changed the plan to wordpress-http3

Those are the steps I did. I did a http3 check (test) and it was negative (I can send you the url privately if you need it).

Now I am going to install more domains, should I follow the same steps to make it work correctly? Well, when it works hehe I have a “gift” to make simple things complicated for me.

I forgot to open the 443 UDP port

Thanks for reminding me. Sometimes I think I am Ralph…

1 Like