Выполнение php-скриптов в html-файлах
Добавлено: 05 май 2012, 15:43
Как разрешить выполнение php-скриптов в файлах с расширением html? Как в апаче сделать знаю. Нужно в nginx. 
location ~ \.html$ {
try_files $uri =404;
root "%hostdir%";
fastcgi_pass backend;
fastcgi_index index.html;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param TMP "%sprogdir%/server/http/%httpdriver%/temp";
fastcgi_param TMPDIR "%sprogdir%/server/http/%httpdriver%/temp";
fastcgi_param TEMP "%sprogdir%/server/http/%httpdriver%/temp";
include "%sprogdir%/server/http/%httpdriver%/conf/fastcgi.conf";
}location ~ \.php$ { добавил расширение, т.е. location ~ \.php|html$ {
Теперь работает и там и там.