Question: Websites hosted in Plesk are not accessible after a recent Apache update: 421 Misdirected Request
Applicable to:Symptoms421 Misdirected Request
The following error message is logged in domain's log ([b]Plesk > Domains > example.com > Logs[/b]):
AH02032: Hostname default-203_0_113_2 (default host as no SNI was provided) and hostname www.example.com provided via HTTP have no compatible SSL setup
CauseIn recent Apache version, Apache team has released fixes for CVEs that affected Apache + nginx functionality: new changes do not allow Apache process requests from nginx without the server name (by default, nginx does not pass the server name through SNI when establishing a connection with a proxied HTTPS server).
ResolutionInstall Plesk versions 18.0.70.3 or 18.0.71.1 to automatically resolve the issue.
Note: the hotfixes are compatible with the manual workaround. So, even for servers where manual solution is already applied, no extra steps are required after installing Plesk update.
As a manual workaround for previous Plesk versions:Add proxy_ssl_server_name, proxy_ssl_name and proxy_ssl_session_reuse directives in nginx configuration to make nginx pass the server name to Apache through TLS Server Name Indication (SNI) extension:
1.Connect to the server via SSH
2.Run the script (without any modifications):
# echo -e "proxy_ssl_server_name on;\nproxy_ssl_name \$host;\nproxy_ssl_session_reuse off;" > /etc/nginx/conf.d/fixssl.conf && systemctl restart nginx