내 사이트에 파일을 업로드하려고하면 Nginx "413 Request Entity Too Large"오류가 발생하지만 nginx.conf 파일에 이미 최대 크기가 명시되어 있습니다. 약 250MB 였고 php.ini 파일의 최대 파일 크기도 변경했습니다. (예, 프로세스를 다시 시작했습니다). 오류 로그 나에게주는이 :Nginx 오류 413
2010년 12월 6일 4시 15분 6초 [오류] 20124 # 0 : 1,144,149 바이트, 클라이언트 : 너무 큰 몸을 보내기위한 * 11975 클라이언트 60.228.229.238 서버 : www.x.com는 요청 : "POST 업로드/HTTP/1.1", 호스트 : "x.com", 참조 자 : "http://x.com/"
로 내가 아는 한 1144149 바이트는 250MB가 아닙니다 ... 여기에 뭔가가 있습니까?
user nginx;
worker_processes 8;
worker_rlimit_nofile 100000;
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;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
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;
client_max_body_size 300M;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
gzip on;
gzip_static on;
gzip_comp_level 5;
gzip_min_length 1024;
keepalive_timeout 300;
limit_zone myzone $binary_remote_addr 10m;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/sites/*;
}
그리고 사이트의 가상 호스트 :
여기 기본 Nginx에의 설정입니다
server {
listen 80;
server_name www.x.com x.com;
access_log /var/log/nginx/x.com-access.log;
location/{
index index.html index.htm index.php;
root /var/www/x.com;
if (!-e $request_filename) {
rewrite ^/([a-z,0-9]+)$ /$1.php last;
rewrite ^/file/(.*)$ /file.php?file=$1;
}
location ~ /engine/.*\.php$ {
return 404;
}
location ~ ^/([a-z,0-9]+)\.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
변경 한 nginx 구성 설정을 인용해야합니다. –
좋아요. – EJay