질문: nginx: [error] open () "/ usr / local / nginx / logs / nginx. pid" failed (2: 파일 이나 디렉토리 가 없습니다)

2180 단어 Linux 서버
nginx 오류 처리 다시 시작
문제 설명
문제 분석
해결 방법
문제 설명
Linux 서버 에 Nginx 와 FastdFS 파일 관리 서버 를 구축 할 때 nginx. conf 를 설정 하여 재 부팅 을 준비 하 는 중 오류 가 발생 했 습 니 다. 오 류 는 다음 과 같 습 니 다.
[root@iz2ze7620wvus2frdwty5kz sbin]# ./nginx -s reload
ngx_http_fastdfs_set pid=27932
nginx: [error] open() "/usr/local/nginx//logs/nginx.pid" failed (2: No such file or directory)

문제 분석
오류 설명 은 프로젝트 시작 시 파일 * * "/ usr / local / nginx / logs / nginx. pid" * 가 부족 합 니 다. 재 부팅 시 설정 파일 nginx. conf 가 지정 되 지 않 았 기 때 문 일 수도 있 습 니 다.
해결 방법
재 부팅 방식 을 바 꾸 고 설정 파일 nginx. conf 시작 nginx 를 지정 합 니 다.
[root@iz2ze7620wvus2frdwty5kz sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ngx_http_fastdfs_set pid=29227

시작 에 성공 하면 정적 파일 도 정상적으로 접근 할 수 있 습 니 다. 제 파일 관리 서버 를 계속 구축 할 수 있 습 니 다 ~ ~

좋은 웹페이지 즐겨찾기