imagemagick is already the newest version (8:6.8.9.9-7ubuntu5.16).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
.Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: libmagickwand-6.q16-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
лучше делай через код ошибки и закидывай его на движок.
ТОды все будет в шоколаде
В твоем случае вместо proxy_pass
подставляй FPM
ТО есть когда будте 404 он все-равно отправит ее отдаваться ядром сайта а не сам будет ее отдавать.