티스토리 뷰

https://github.com/php79/stack


위 git을 이용하여 설치함..


일단 한서버에 다 구축해서 테스트를 진행할 예정이라 한방에...


여기서 발생하는 문제들은 설정파일들의 경로가 기존경로랑 좀 다르다는것..


nginx에서 php로 연결되는 포트가 다르다는것.. 정도?


다 설치된 후에 nginx에서 php연결부분은 따로 설정은 해줘야함


nginx 설정폴더 경로 /etc/nginx/conf.d


php 설정폴더 경로 /etc/opt/remi/php70



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




location / {

        root   /usr/share/nginx/html;

        index  index.html index.htm index.php;

    }


location ~ \.php$ {

        root           /usr/share/nginx/html;

        fastcgi_pass   127.0.0.1:9070;

        fastcgi_index  index.php;

        fastcgi_param  SCRIPT_FILENAME $document_root/$fastcgi_script_name;

        include        fastcgi_params;

    }


fastcgi_pass 포트번호가 기본으로 9000으로 세팅되어있으나

git을 이용해서 설치해서 상태를 확인하면 php fpm 포트가 9070을 잡고있음..

그래서 root 경로에 index.php 파일을 생성하고 연결을 해봐도 502 에러가 발생함..


fastcgi_pass 포트를 php fpm이 보고있는 포트로 수정해줘야 정상적으로 연결 됨.



'serverSide > Linux' 카테고리의 다른 글

CentOS 7 nginX 가상 호스트 설정  (0) 2016.11.25
CentOS 7 ssh sftp 설정  (0) 2016.11.24
CentOS 7 ssh 설정  (0) 2016.11.17
CentOS7 SSH 포트 변경  (0) 2016.11.15
CentOS7 설치  (0) 2016.11.15
댓글