nginx + php-fpm 服务器配置

阅读更多

增加.htm格式的文件解析为php

 

修改nginx.conf,在server{}内,添加

 

location ~ \.php|\.htm$ {

root           /home/www;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

include        fastcgi_params;

}

 

修改/etc/php-fpm.d/www.conf

security.limit_extensions = .php .php3 .php4 .php5 .htm

 

 

你可能感兴趣的:(nginx,php-fpm)