웹/PHP

ngnix, php 연동

범고래_1 2021. 6. 15. 09:43

1. php-fpm 설치

apt install php-fpm

 

2. /etc/nginx/sites-available/default 수정

location 추가 (fastcgi_pass)

   location ~ \.php$ {
                include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
 }

 

' > PHP' 카테고리의 다른 글

php 에러설정  (0) 2018.10.22
PHP 설치 각종 설정  (0) 2018.03.20
PHP 버전 바꾸기  (0) 2017.07.07
아파치, PHP 보안설정  (0) 2017.01.12
php code checker  (0) 2016.04.22