How can I instruct nginx to interpret an individual file as php
- by codecowboy
A legacy application relies on the following .htaccess rule for an individual file
<Files MyFile.html>
AddType application/x-httpd-php .html
</Files>
The new machine has nginx and php-fpm installed with the following config:
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}