I use nginx as a reverse proxy. Behind it is coming apache hosing foo.com . In order to upload a big file, I set post_max_size = 20M
and upload_max_filesize = 20M
in php.ini . But I can't upload file with size bigger than 2MB. My nginx configuration is:
server {
listen 80;
server_name .foo.com;
if ($http_host != "www.foo.com") {
rewrite ^ http://www.foo.com$request_uri permanent;
}
access_log /var/log/nginx/foo.access.log;
error_log /var/log/nginx/foo.error.log;
index index.php index.html;
location / {
proxy_pass http://192.168.1.2:80/;
include /etc/nginx/proxy_params;
proxy_buffering off;
chunked_transfer_encoding on;
}
}
In addition I configured nginx.conf as following:
http {
...
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 600;
client_max_body_size 200M;
types_hash_max_size 2048;
# server_tokens off;
include fastcgi_params;
fastcgi_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
...
}
Any ideas on how to solve the problem?