nginx 配置 :
把原来的 location ~\.php$ { 改成 location ~ \.(php|html)$ {
配置如下:
location ~ \.(php|html)$ {
root /home/kyle/www;
fastcgi_connect_timeout 120;
fastcgi_send_timeout 120;
fastcgi_read_timeout 120;
fastcgi_buffer_size 512k;
fastcgi_buffers 4 512k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
client_max_body_size 80m;
fastcgi_intercept_errors off;
}
php配置 :
打开 php-fpm.conf
找到下面这一行,在后面加上 html ,并去掉前面的分号
security.limit_extensions = .php .php3 .php4 .php5 .html .htm