nginxで403エラーが発生します。
systemctl status nginxを確認すると、
7月 17 14:36:01 localhost.localdomain systemd[1]: Stopped nginx - high performance web server. 7月 17 14:36:01 localhost.localdomain systemd[1]: Starting nginx - high performance web server... 7月 17 14:36:01 localhost.localdomain systemd[1]: nginx.service: Can't open PID file /run/nginx.pid (yet?) after start: No such file or directory 7月 17 14:36:01 localhost.localdomain systemd[1]: Started nginx - high performance web server.
と出ます。
/run/nginx.pidを読み込む権限がないのは分かったのですが、これはどうやって解決すればいいでしょうか?
/etc/nginx/nginx.conf
user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; include /etc/nginx/conf.d/*.conf; server { listen 80 default_server; location / { root /www/dir; index index.html index.htm; } } }
ログ
2020/07/17 14:16:54 [notice] 27941#27941: signal process started 2020/07/17 14:16:54 [error] 27941#27941: open() "/run/nginx.pid" failed (2: No such file or directory)