nGinx Uploads

I have just moved a site over to the nginx platform and the site runs fine except for uploading user images / files / etc….

Do you need to allow uploads? I remember Apache had an allow uploads:Yes / No option.

Does nginx have this function?

Should it allow uploads automatically or is there something I need to configure somewhere.

Thanks,

Dave

4 Replies

The "allow uploads" option is usually found in your php.ini file. But it's unlikely that switching to nginx disabled this, because most PHP configurations allow uploads by default.

You might also need to add something like the following to your nginx configuration, in case the default doesn't allow large requests:

client_max_body_size 32M;

Thanks, I have added that into the server {} block in the sites-available/site.com but that has done nothing for me. Is there another file to add that to? Did I add it in the wrong spot?

Thanks,

Dave

Did you restart the nginx server afterwards?

I did. But I got it working. Error on my part with the form, so nothing server related.

Thanks all the same :)

Dave

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct