Nginx settings

lufy
January 22, 2022

nginx met error log of  "open() "/var/lib/nginx/tmp/proxy/9/05/0000000059" failed (13: Permission denied) while reading upstream", change the proxy_temp_path solved. 


# Override temp file locations
client_body_temp_path /var/lib/nginx-tmp/client_body;
proxy_temp_path /var/lib/nginx-tmp/proxy;
fastcgi_temp_path /var/lib/nginx-tmp/fastcgi 1 2;
uwsgi_temp_path /var/lib/nginx-tmp/uwsgi;
scgi_temp_path /var/lib/nginx-tmp/scgi;


 


Question:


When I download big file (about 300MB), the server failed with "


nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument"


Change nginx.service config with:


printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf


systemctl daemon-reload


After the operation, it still not work fine, and this time without any error message in the log, neither system log nor nginx error log.


 

Comments (0)

Leave a Comment
Maximum 1000 characters

No comments yet. Be the first to comment!