PHP 및 Nginx 설정

2023. 11. 5. 18:26카테고리 없음

728x90
반응형
        location / {
            root   html;
            index  index.html index.htm index.php;
        }
        
        # index.php 추가해줌

원래 주석을 다 삭제 해주고

php 스크립트 파일이 있는 위치를 작성해 준다.

fastcgi_param  SCRIPT_FILENAME  [파일경로]$fastcgi_script_name;
fastcgi_param  SCRIPT_FILENAME  C:/nginx-1.24.0/nginx-1.24.0/html$fastcgi_script_name;
 location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  C:/nginx-1.24.0/nginx-1.24.0/html$fastcgi_script_name;
            include        fastcgi_params;
        }

 

 

 

https://phsun102.tistory.com/46

 

Nginx php-fpm 설정방법

0. php-fpm이란? 먼저, CGI ( Common Gateway Interface )는 웹서버와 외부 프로토콜을 연결시켜주는 표준 프로토콜이다. 이 CGI는 각각의 요청별로 프로세스를 생성한다. 요청이 들어올 때 마다 프로세스의

phsun102.tistory.com

 

반응형