全部博文(321)
分类: LINUX
2013-11-11 11:00:08
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /home/www/htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/www/htdocs$fastcgi_script_name;
include fastcgi_params;
client_max_body_size 35m; #客户端上传文件大小设为35M
client_body_temp_path /home/www/nginx_temp; #设置临时目录
}
2、修改php.ini
upload_max_filesize = 8M post_max_size = 10M memory_limit = 20M max_execution_time=300 file_uploads = On 默认允许HTTP文件上传,此选项不能设置为OFF。 upload_tmp_dir =/tmp/www