Nginx error 500 image upload

460 views
Skip to first unread message

Alex House

unread,
Jun 2, 2016, 3:13:00 AM6/2/16
to Wagtail support
The problem with downloading images from the admin panel. I checked load in two versions with and without nginx. Error 500 appears only nginx. Although all settings made on the file instruc - https://github.com/torchbox/wagtail/blob/master/etc/nginx.conf.sample

My error.log nginx:

2016/06/02 09:26:48 [warn] 6880#6880: *8 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: **.**.82.142, server: ***ta.market, request: "POST /admin/images/multiple/add/ HTTP/1.1", host: "***ta.market", referrer: "http://***ta.market/admin/images/multiple/add/"


How to solve a problem?

Alex House

unread,
Jun 2, 2016, 3:56:33 AM6/2/16
to Wagtail support
After various options and mistakes made available 777 to all the project files and loading earned. I think that was the prohibition of access to writing files. I will be experimenting to see which was a mistake.

четверг, 2 июня 2016 г., 17:13:00 UTC+10 пользователь Alex House написал:

Brett Grace

unread,
Jun 2, 2016, 10:51:23 AM6/2/16
to Wagtail support
A couple of things:

1) The directory needs to be readable/executable by the nginx user (or all), but it only needs to be writable by the user your Wagtail site is running as. 777 should not be necessary, you can use 755 if the ownership is correct.

2) A 500 error will usually be from something inside the Wagtail app, not nginx, so to confirm the error message you should enable logging for Wagtail.

3) The message client request body is buffered to a temporary file is probably harmless, it just means that the file you uploaded is larger than what is configured to fit in memory, so it uses a temp file instead. You don't want to set this too high. See, for example, http://serverfault.com/questions/511789/nginx-client-request-body-is-buffered-to-a-temporary-file
Reply all
Reply to author
Forward
0 new messages