ファイルを自分のサイトにアップロードしようとすると、Nginxの "413 Request Entity Too Large"エラーが表示されますが、nginx.confファイルでは、現時点で約250MBであり、php.iniの最大ファイルサイズも変更しました(そして、はい、私はプロセスを再開しました)。エラーログは私にこれを与える:Nginxエラー413
2010年12月6日4時15分06秒[エラー] 20124#0:あまりにも大きな体を送信することを目的と * 11975クライアント:1144149バイト、クライアント: 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