Username:
TITLE
ISSUE - Nginx config generation failure and http2 directive implementation failure
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Tested on :
Product version: Plesk Obsidian 18.0.61.4
OS version: Ubuntu 20.04 x86_64
Build date: 2024/05/28 05:00
Revision: 81fad59b98465445debc4a7e2cbef11dc90f99ff
nginx version: nginx/1.26.0
PROBLEM DESCRIPTION
Nginx sends error notification by email for each and every domain on the server :
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/plesk.conf.d/..
This error notification implies improper usage of the http2 directive, introduced in Nginx 1.25.1
The nginxDomainVirtualHost.php template used for generation of Nginx templates contains
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>;
<?php if ($OPT['ssl'] && $OPT['http2']) : ?>
http2 on;
<?php endif; ?>
The aforementioned code is correct and should have resulted in PROPER REGENERATION of Nginx config.
However, the Nginx config files of each and every domain exhibit
listen [ip address]:443 ssl http2;
In short, Nginx templates are NOT GENERATED with the (new) nginxDomainVirtualHost.php template!!
STEPS TO REPRODUCE
A - STR 1
1 - install older version of Plesk with Nginx version lower than 1.25.1
2 - update Plesk, in order to have Nginx version 1.25.1 or higher, with associated Nginx config templates
3 - check result with nginx -t
B - STR 2
On the test machine, some custom Nginx templates were added to improve the default Nginx caching templates.
It might be the case that custom Nginx templates are interfering with Nginx config generation, since this "generation issue" has been occurring before - it is not limited to http2 directive changes alone.
1 - install older version of Plesk with Nginx version lower than 1.25.1
2 - add custom Nginx templates in /opt/psa/admin/conf/custom/ ....
3 - update Plesk, in order to have Nginx version 1.25.1 or higher, with associated Nginx config templates
4 - check result with nginx -t
ACTUAL RESULT
Plesk Nginx config files still contain
listen [ip address]:443 ssl http2;
even if the new nginxDomainVirtualHost.php generation template is present!
EXPECTED RESULT
The new nginxDomainVirtualHost.php generation template should generate
listen [ip address]:443 ssl;
http2 on;
ANY ADDITIONAL INFORMATION
The current issue is a bug that has been present before, so it is inherent to the process of Nginx config regeneration.
It might be related to the presence of custom Nginx config templates or, better said, the lack of dealing with them.
It might also be related to systemic behavior of Nginx - in this case, this would be very very very unlikely.
It can also be related to the chronological order in which
- Nginx updates,
- Nginx config generation templates,
- Nginx config generation,
are installed and/or executed.
It would be my educated guess that the "choronological order" of process is the root cause of the problem!
After all, regeneration of config files after updates often does the trick!
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
ISSUE - Nginx config generation failure and http2 directive implementation failure
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Tested on :
Product version: Plesk Obsidian 18.0.61.4
OS version: Ubuntu 20.04 x86_64
Build date: 2024/05/28 05:00
Revision: 81fad59b98465445debc4a7e2cbef11dc90f99ff
nginx version: nginx/1.26.0
PROBLEM DESCRIPTION
Nginx sends error notification by email for each and every domain on the server :
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/plesk.conf.d/..
This error notification implies improper usage of the http2 directive, introduced in Nginx 1.25.1
The nginxDomainVirtualHost.php template used for generation of Nginx templates contains
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>;
<?php if ($OPT['ssl'] && $OPT['http2']) : ?>
http2 on;
<?php endif; ?>
The aforementioned code is correct and should have resulted in PROPER REGENERATION of Nginx config.
However, the Nginx config files of each and every domain exhibit
listen [ip address]:443 ssl http2;
In short, Nginx templates are NOT GENERATED with the (new) nginxDomainVirtualHost.php template!!
STEPS TO REPRODUCE
A - STR 1
1 - install older version of Plesk with Nginx version lower than 1.25.1
2 - update Plesk, in order to have Nginx version 1.25.1 or higher, with associated Nginx config templates
3 - check result with nginx -t
B - STR 2
On the test machine, some custom Nginx templates were added to improve the default Nginx caching templates.
It might be the case that custom Nginx templates are interfering with Nginx config generation, since this "generation issue" has been occurring before - it is not limited to http2 directive changes alone.
1 - install older version of Plesk with Nginx version lower than 1.25.1
2 - add custom Nginx templates in /opt/psa/admin/conf/custom/ ....
3 - update Plesk, in order to have Nginx version 1.25.1 or higher, with associated Nginx config templates
4 - check result with nginx -t
ACTUAL RESULT
Plesk Nginx config files still contain
listen [ip address]:443 ssl http2;
even if the new nginxDomainVirtualHost.php generation template is present!
EXPECTED RESULT
The new nginxDomainVirtualHost.php generation template should generate
listen [ip address]:443 ssl;
http2 on;
ANY ADDITIONAL INFORMATION
The current issue is a bug that has been present before, so it is inherent to the process of Nginx config regeneration.
It might be related to the presence of custom Nginx config templates or, better said, the lack of dealing with them.
It might also be related to systemic behavior of Nginx - in this case, this would be very very very unlikely.
It can also be related to the chronological order in which
- Nginx updates,
- Nginx config generation templates,
- Nginx config generation,
are installed and/or executed.
It would be my educated guess that the "choronological order" of process is the root cause of the problem!
After all, regeneration of config files after updates often does the trick!
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug