title: Restrict file access with nginx and javascript
body: <p>I have several javascript projects served by nginx. The project directory is structured as this way: images/, javascripts/, css/, and index.html. On the production server, I combine and minify all js and css files (app_min.js &amp; app_min.css) into only two files. However, I want to restrict all files (except images directory, app_min.js, app_min.css, and index.html) on the production server. Here is my simple nginx configuration:</p>
  
  <pre><code>location /opa {
     alias /var/www/project_a/;
     index index.html;
     break;
  }
  </code></pre>
  
  <p>Anyone could explain me how to implement this?</p>