m1MAC使用nginx上传图片至minIO时显示500 Internal Server Error错误解决

在检查网页网络后,发现响应: 500 Internal Server Error

500 Internal Server Error


nginx/1.25.1

由此查看nginx错误日志,但错误日志需要打开,为方便查看错误信息,可直接在nginx.conf文件中的最上面加上 error_log logs/error.log info; 以查看错误信息

结果如下:

2023/08/17 22:44:29 [crit] 73618#0: *7 open() "/opt/homebrew/var/run/nginx/client_body_temp/0000000001" failed (13: Permission denied), client: 127.0.0.1, server: , request: "POST /wemedia/MEDIA/wemedia/api/v1/material/upload_picture HTTP/1.1", host: "localhost:8802", referrer: "http://localhost:8802/"

可以看出是因为Permission denied导致失败的,为此对"/opt/homebrew/var/run/nginx/“文件夹进行权限升级:

chmod -R 777 /opt/homebrew/var/run/nginx/

由此问题解决!

你可能感兴趣的:(macos,nginx,运维)