title: Prevent Direct Url Access from Node.js Application
body: <p>I deployed Node.js application to linux server, and it works well. </p>
  
  <p>But, I can direct access to specific file in browser to typing url.  </p>
  
  <p><a href="http://my-node-app.com/package.json" rel="nofollow">http://my-node-app.com/package.json</a> </p>
  
  <p>I can see all the things, even if </p>
  
  <p><a href="http://my-node-app.com/config/config.json" rel="nofollow">http://my-node-app.com/config/config.json</a> </p>
  
  <p>It shows my configuration include password. It would not shown except server itself, how can I restrict access?</p>
  
  <p>I added .htaccess file in var/www/, and added this code,</p>
  
  <pre><code>&lt;Directory "my-node-app"&gt;
    Deny from all
  &lt;/Directory&gt; 
  </code></pre>
  
  <p>But it not works, and I tried /etc/apache2/site-enabled/000-default, add like above code, but it's not work. I googled and adding codes but It's not work and I don't know it is related with apache2 or not. Node.js needs Apache2? Anyway, How can I prevent this direct access from url include wget?</p>