Jehna :)

nginx 403 Forbiddent 에러 본문

윌리/System 이것저것

nginx 403 Forbiddent 에러

Jehna 2020. 11. 8. 23:58

환경

     CentOS7.x /  nginx / php-fpm / mariadb



* 에러 메시지 

1. /var/log/nginx/error.log



 2020/11/08 23:39:18 [error] 16076#16076: *3 FastCGI sent in stderr: "Primary script unknown" 
 while reading response header from upstream, client: 157.55.39.52, server: XXXXXXXX, request:
 "GET /progress_list.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host:
 "new.hscan.co.kr"
 



2. 브라우저 상태



  403 Forbidden !!

 



* 해결방법

- /etc/nginx/conf.d/default.conf 파일 수정


 location / {

        index  index.html index.htm index.php;  //index.php 추가

 }

 


- nginx 재시작