title: NGINX execute embedded PHP in HTML file
body: <p>I have the following config:</p>
  
  <pre><code>server {
    listen 80 default_server;
  
    access_log /var/www/logs/access.log;                                                                                           
    error_log /var/www/logs/error.log error;     
  
    root /var/www/web/;
  
    index index.html index.php;
  
    server_name _;
  
    location / { 
      try_files $uri $uri/ =404;
    }
  
    # HACK: This is temporary to work around renaming dozens of HTML links
    location ~ \.htm$ {
      root html;
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      fastcgi_index index.htm;
  
      include fastcgi_params;
    }
    # HACK: This is temporary to work around renaming dozens of HTML links
  
    location ~ [^/]\.php(/|$) {
      fastcgi_split_path_info ^(.+?\.php)(/.*)$;
      if (!-f $document_root$fastcgi_script_name) {
        return 404;
      }
  
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      fastcgi_index index.php;
  
      include fastcgi_params;
    }
  }
  </code></pre>
  
  <p>And I updated /etc/php5/fpm/pool.d/www.conf adding the line:</p>
  
  <pre><code>security.limit_extensions = .php .html 
  </code></pre>
  
  <p>Restarted FPM and NGINX but when I access .html files the PHP is not rendered...*.php files execute as expected...</p>
  
  <p>What else am I missing???</p>