Symptoms
- A working ASP.NET Core application stops working after enabling HTTP/3 as per documentation with errors 400 and 499.
Cause
The issue is related to the bug PPPM-14435: HTTP/3 breaks phusion passenger implementation of .NET toolkit.
Resolution
Warning: The following workaround only works in websites where nginx Proxy mode is disabled.
Warning: If the website has nginx Proxy mode enabled this may cause an error after restarting the service, since "location /" directive is already used in the custom proxy directives.
Until the bug is fixed, there is one workaround:
-
Connect to the server via SSH
-
Edit file
/var/www/vhosts/system/$domain/conf/vhost_nginx.conf
(where $domain is the affected domain) -
Add the following text as such:
#extension dot-net begin
location / {
passenger_enabled on;
passenger_set_header Host $host:$server_port;Note: If the website has nginx proxy mode enabled, use only the last line.
-
Save the file and restart nginx:
# systemctl restart nginx
Comments
2 comments
If you change the nginx vhost directly it will be overwritten by any change in the .NET Toolkit extension. A more permanent fix is adding it as an additional Nginx directive under Apache & nginx Settings
Plesk Nginx sometimes returns a 400 Bad Request response to HTTP/3.0 requests to users, and sometimes it converts the request protocol HTTP/3.0 to HTTP/2.0 and returns a 200 OK status code and HTTP/2.0 protocol. Due to the increasing number of users accessing on new mobile chrome browsers, the number of 400 errors related to HTTP/3.0 is increasing, because new chrome versions use HTTP/3.0 by default.
I am using shared hosting and I cannot make any changes to the plesk nginx settings, so why is nginx sometimes returning a 400 Status, please solve this problem.
Please sign in to leave a comment.