<div dir="ltr">I am using nginx (0.6.29) on Freebsd 7 amd64 as a reverse proxy to back end web sites. It works very well except for php based file uploads.<br><br>I googled and found mention of setting the max post/upload/body size on the php and front end nginx.con and verified that they are correct:<br>
<br>php.ini:<br><br>upload_max_filesize = 2M<br>post_max_size = 3M<br>upload_tmp_dir = /tmp<br><br>nginx.conf: $server is pulled from a map, it maps the host name to backend server<br><br> location / {<br> proxy_set_header Host $host;<br>
proxy_set_header X-Real-IP $remote_addr;<br> proxy_set_header X-Forwarded-For $remote_addr;<br> proxy_redirect off;<br> proxy_pass http://$server$request_uri;<br>
<br> client_max_body_size 2M;<br> client_body_buffer_size 2M;<br><br> proxy_buffering off;<br><br> proxy_connect_timeout 5;<br> proxy_send_timeout 90;<br>
proxy_read_timeout 120;<br><br> proxy_pass_header Expires;<br> proxy_pass_header Cache-Control;<br> proxy_pass_header Last-Modified;<br> proxy_pass_header ETag;<br>
proxy_pass_header Content-Length;<br><br> }<br><br>When I do the upload, the temp file does not end up in /tmp although I do see that the folder is touched (time incremented to the time of the upload). <br>
<br>Am I missing anything simple? I'm stumped and been working on this on and off for 4 days now.<br><br></div>