我怎么能让nginxparsingphp代码到扩展名为.htm的文件中?
我需要这个,因为我从apache迁移,更改所有的文件扩展名将是一个非常头痛的问题。
谢谢。
这个从默认的nginx.conf中的代码片段,replace.php
的.htm
location ...
并享受。
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #}