nginx.service: Failed to parse PID from file /var/run/nginx.pid: Invalid argument bugs
原文:https://medium.com/@parsher/nginx-service-failed-to-parse-pid-from-file-var-run-nginx-pid-invalid-argument-bugs-fda95eeeda73 # Fix for Nginx PID problem in Ubuntu 16.04 in an EC2 instance sudo systemctl stop nginx sudo mkdir /etc/systemd/system/nginx.service.d # build the file in root where no sudo is needed printf “[Service]\nExecStartPost=/bin/sleep 0.1\n” > override.conf sudo cp override.conf /etc/systemd/system/nginx.service.d/override.conf sudo systemctl daemon-reload sudo systemctl start nginx