title: How to route .html and .js files as PHP on Nginx FastCGI server?
body: <p>For web servers using PHP as apache module:</p>
  
  <pre><code>AddType application/x-httpd-php .html .htm
  </code></pre>
  
  <p>For web servers running PHP as CGI:</p>
  
  <pre><code>AddHandler application/x-httpd-php .html .htm 
  </code></pre>
  
  <p>I have an Nginx server and I want to run .js files and and .htm files as PHP, so I will have full PHP code inside them. Anyone know how to configure the Nginx to do this?</p>