title: Nginx 301 redirect custom page doesn't work, still returns the one with "nginx" in it
body: <p>So, we need to conceal that nginx is our server and one of the ways in which it reveals itself is through its error pages. For that, we have a snippet:</p>
  
  <pre><code>error_page 404 /404.html;
  error_page 403 /403.html;
  # redirect server error pages to the static page /50x.html
  error_page 500 502 503 504 /500.html;
  
  # Non-rails error pages
  error_page 301 /error/301.html;
  error_page 307 /error/307.html;
  error_page 308 /error/308.html;
  error_page 400 /error/400.html;
  error_page 401 /error/401.html;
  error_page 405 /error/405.html;
  error_page 406 /error/406.html;
  error_page 408 /error/408.html;
  error_page 413 /error/413.html;
  error_page 415 /error/415.html;
  error_page 429 /error/429.html;
  error_page 431 /error/431.html;
  
  location ^~ /error/ {
    internal;
    root /usr/share/nginx/html;
  }
  </code></pre>
  
  <p>which is included into the <code>server {}</code> block:</p>
  
  <pre><code>server {
    listen 80;
    server_name ourhost.com
    include /etc/nginx/snippets/error_pages.conf;
    return 301 https://$server_name$request_uri;
  }
  </code></pre>
  
  <p>All pages contain just an error number and message without any revealing information. However, the 301 page still returns:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>which isn't what we want. How do I make custom 301 page loaded instead of the default nginx one? </p>