PHP配置:php.ini
-
json_encode方法浮点精度错误,解决方法:修改:precision = 16
-
disable_functions = eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_set,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,fsocket,fsockopen,error_reporting
-
date.timezone = Asia/Shanghai
Nginx配置:nginx.conf
- fastcgi_buffers 解决cookie或请求响应头超大的502错误 ,
- Gzip压缩
http {
...
# buffers
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
...
# Gzip
gzip on;
gzip_min_length 1k;
gzip_buffers 16 64k;
gzip_comp_level 6;
gzip_types text/plain application/javascript text/css application/xml;
gzip_vary on;
...