>我正在尝试通过更改nginx.conf将PHP应用程序的上传限制增加到512MB,如下所示-
#user nginx;
worker_processes 1;
#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
#pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 512M;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 6500;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]'.(?!.*SV1)";
server_tokens off;
include /etc/nginx/conf.d/*.conf;
}
但是,它似乎仍然被限制在120MB。
有人可以帮忙进行更改以接受超过 120mb 的文件
吗?谢谢。。
看看你的 php.ini 文件:
; Maximum allowed size for uploaded files.
upload_max_filesize = 512M
; Must be greater than or equal to upload_max_filesize
post_max_size = 512M
它需要匹配您的nginx配置