Articles in this section

Unable to run ASP.NET Core application with HTTP/3 enabled on a Plesk server

kb: technical

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:

  1. Connect to the server via SSH

  2. Edit file /var/www/vhosts/system/$domain/conf/vhost_nginx.conf (where $domain is the affected domain)

  3. 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.

  4. Save the file and restart nginx:

    # systemctl restart nginx

Was this article helpful?

Comments

2 comments
Date Votes
  • 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

    1
  • 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.

    1

Please sign in to leave a comment.