NGINX PHP-FPM 업데이트 및 여러 버전 동시 연동 방법
https://extrememanual.net/10557
NGINX 설정 예시
1. abc.com 가상 호스트
server {
listen 80;
server_name abc.com;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
}
}2. xyz.com 가상 호스트
server {
listen 80;
server_name xyz.com;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
}
}가상 호스트 설정 구문에서 PHP 확장자를 컨트롤하는 location 구문에서 fastcgi_pass 경로를 원하는 버전의 소켓과 연결합니다.
사이트별로 다른 PHP 버전을 구동하고 싶은 경우 각 가상 호스트 설정의 위와 같이 원하는 버전으로 소켓을 설정하면 되겠습니다.
참조
https://guides.wp-bullet.com/install-php-7-4-fpm-on-ubuntu-18-04/
댓글 0
댓글을 작성하려면 로그인이 필요합니다.
아직 댓글이 없어요
이 글에 대한 생각을 가장 먼저 남겨보세요.