我的专用根服务器上有一个脚本(类似于 youtube),但我无法上传大型视频文件。
我收到此错误消息:
413 请求实体太大 nginx
程序员写了一个php文件,直接显示错误信息。
我已经调整了nginx.conf
,但错误仍然存在。
#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;
include /etc/nginx/modules.conf.d/*.conf;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 4096M;
#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 65;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server_tokens off;
include /etc/nginx/conf.d/*.conf;
server {
client_max_body_size 4096M;
location / {
client_max_body_size 4096M;
}
}
}
# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;
这些数据设置在php.ini
:
- PHP 7.0.33
- memory_limit 4096M
- 最大执行时间 7200
- 最大输入时间 7200
- post_max_size 4096M upload_max_filesize 4096M
有人能帮我吗?我必须在哪里进行更改才能上传大型视频文件。
谢谢!