I enabled Facebook Canvas for a responsive web app we’re building an noticed despite meeting the SSL requirement and hitting the correct page, that Nginx was returning a 405 Not Allowed.

Turns out Facebook makes a POST request to your HTML page and you need to allow this. Here’s the Nginx code:

location / {
    error_page 405 =200 $uri;
    root /var/www/html/yoursite.com;
}