• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved 421 Misdirected Request, Activesync no longer working

a little clarification

Subdomains will have css erros and domains will have 421 error after running

mv /etc/nginx/conf.d/fixssl.conf /etc/nginx/conf.d/fixssl.conf-old and plesk repair web -y
 
When you visit webmail.domain.tld does that work without any errors being added in the log.

Can you see anything in the Settings > ActiveSync section of the webmail account you use AS with?

Be careful when using domain names during account setup if you've asked the server to rewrite a URL from www.domain.tld > domain.tld as that rewrite rule will kill any POST data. This was also causing me a problem with a POST form submission. GET worked as it could pass along the data in the URL but POST data was being lost..Another pesky issue that was easy to fix (don't use www in the form action link) that took hours to figure out :(
 
When you visit webmail.domain.tld does that work without any errors being added in the log.

Can you see anything in the Settings > ActiveSync section of the webmail account you use AS with?

Be careful when using domain names during account setup if you've asked the server to rewrite a URL from www.domain.tld > domain.tld as that rewrite rule will kill any POST data. This was also causing me a problem with a POST form submission. GET worked as it could pass along the data in the URL but POST data was being lost..Another pesky issue that was easy to fix (don't use www in the form action link) that took hours to figure out :(
No, nothing in the logs when visiting webmail.domain, the server doesn't use www on any domain.
 
Although this won't help you with your server, have you looked at the following to ascertain the data being exchanged with the server from outlook?


Although you're using (or trying to) the auto discovery, considering you can visit webmail.domain.tld and resolve roundcube without any 421 errors, have you tried setting up a manually configured outlook exchange account, using webmail.domain.tld as the server to see if you can at least get a manual account connected with AS? I just can't see why the webmail would load in a browser, but would 421 in Outlook.

A manually configured account may offer up more issues in the logs if you could get it connected.

If you try the Auto Discover directly in your browser, it should return XML that states error 600 if it's working ok:

It's one of those issues where support may need to SSH into the server to see what is actually going on first hand :(

I know I'm all out of ideas with this one, but please let us know if you do find a solution. I wish you a positive outcome.
 
I was going to edit the above, but I cant :/

Also, open this in your browser with valid details to see if you get any XML back


Will return

Misdirected Request​

The client needs a new connection for thisrequest as the requested host name does not matchthe Server Name Indication (SNI) in use for thisconnection.

Apache Server at webmail.**domain** Port 443

Will run a backup restore tonight, so we'll see how it goes.
 
I hope that at least gets you back up n running..

It's strange that the Apache SNI error is clearly causing this and the nginx sslfix isn't helping (unless nginx isn't being used on the domain, would that make a difference?)
 
I hope that at least gets you back up n running..

It's strange that the Apache SNI error is clearly causing this and the nginx sslfix isn't helping (unless nginx isn't being used on the domain, would that make a difference?)

I have tried all the PHPSettings and "run PHP as" and all give 421 error

Removing the SSL/TLS Certificate for users and only add a new for subdomain and domain and not webmail.domain will create a blank page and 00 Invalid input.

Adding the SSL only for webmail.domain will restore the 421 error.

So the domain responding with wrong domain webmail.**domain** has to be fixed
 
Working solution from VNick

Login with SSH
replace the /etc/nginx/conf.d/fixssl.conf content with:
proxy_ssl_server_name on;
proxy_ssl_session_reuse off;

map $host $webmail_host {
~^webmail\..+ $host;
default webmail.$host;
}
map $request_uri $proxied_host {
~*^/autodiscover/autodiscover.xml $webmail_host;
~*^/(\.well-known/autoconfig/|)mail/config-v1.1.xml $webmail_host;
~*^/Microsoft-Server-ActiveSync $webmail_host;
~*^/iRony $webmail_host;
default $host;
}
proxy_ssl_name $proxied_host;
run
sudo systemctl restart nginx
wait about 1 min.
 
Back
Top