title: Return 200 by Nginx without serving a file
body: <p>I wrote this <code>/etc/nginx/conf.d/apply.conf</code> and started nginx.</p>
  
  <pre><code>server {
  location = /hoge {
      return 200;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>but the curl command fails.</p>
  
  <pre><code>curl localhost:80/hoge
  </code></pre>
  
  <p>It says </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;404 Not Found&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx/1.13.9&lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and the logs are </p>
  
  <pre><code>open() "/usr/share/nginx/html/hoge" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /hoge HTTP/1.1", host: "localhost"
  </code></pre>
  
  <p>I want to just return the status code without response body or with response body blank.</p>
  
  <p>I changed to this but still not working.</p>
  
  <pre><code>location /hoge {
  return 200 'Wow';
  add_header Content-Type text/plain;
  }
  </code></pre>
  
  <p>also tried this.</p>
  
  <pre><code>location /hoge {
  return 200 'Wow';
  default_type text/plain;
  }
  </code></pre>