Php 413请求实体太大nginx
我试图通过如下更改nginx.conf将PHP应用程序的上传限制提高到512MB-Php 413请求实体太大nginx,php,nginx,Php,Nginx,我试图通过如下更改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 {
#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配置相匹配这是服务器的一部分,现在如果您想通过php上传,您也必须增加限制(在php.ini中)请参阅。。。不要忘记重新启动nginx;)是的,我也通过.htaccess对其进行了如下更改-php_value max_execution_time 600 php_value upload_max_filesize 512M php_value post_max_size 512M php_value memory_limit 512M nginx的重新加载和重新启动之间的任何差异?重新加载刷新设置,重新启动确实会完全终止Web服务器,而且它暂时不可用,我认为重新加载不会发生这种情况。您是否允许.htaccess覆盖php.ini?这篇文章是关于这一点的:我刚刚用phpinfo()进行了验证;新的值正在反映。刚刚发现这个帖子:您可能还需要增加超时限制,您可以尝试重新加载php5 fpm和nginx