nginx 설치법(centos+php+mysql, yum) > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

nginx 설치법(centos+php+mysql, yum)

페이지 정보

profile_image
작성자 미친새
댓글 0건 조회 19,121회 작성일 20-02-21 12:10

본문

nginx 설치법

yum install nginx

service nginx start


yum --enablerepo=remi install php-fpm

service php-fpm start


include /etc/nginx/conf.d/*.conf;

vi /etc/nginx/conf.d/default.conf

location ~ .php$ {
            root          /etc/share/nginx/html;
            include        fastcgi.conf;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }


--실제 적용

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ .php$ {
    #    root          html;
        root /usr/share/nginx/html;
        try_files $uri = 404;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    #    include        fastcgi_params;
        include        /etc/nginx/fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /.ht {
        deny  all;
    }


service nginx restart

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

공지사항

  • 게시물이 없습니다.

접속자집계

오늘
1,629
어제
2,003
최대
3,834
전체
849,085
Copyright © 소유하신 도메인. All rights reserved.