낄롱의 블로그

즐기자...

블로그 이미지

라라벨5 nginx로 돌리기

프로그래밍/PHP 2018. 2. 5. 19:54

ubuntu16, php7.2


apt-get install nginx


설치 후 버전확인

nginx -v ,


conf 경로 확인

nginx -t


설치할것들

apt-get install php7.2-fpm


apt-get install php7.2-zip php7.2-gd mcrypt php7.2-mbstring php7.2-xml php7.2-mysqli php7.2-curl


/etc/nginx/nginx.conf에서 ssl 셋팅시

ssl on;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE

        ssl_prefer_server_ciphers on;

        ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';



/etc/nginx/sites-available/ 에서

default를 아래와 같이 수정


server {

        listen 80 default_server;

        listen [::]:80 default_server ipv6only=on;


        # SSL configuration

        #

        # listen 443 ssl default_server;

        # listen [::]:443 ssl default_server;

        #

        # Note: You should disable gzip for SSL traffic.

        # See: https://bugs.debian.org/773332

        #

        # Read up on ssl_ciphers to ensure a secure configuration.

        # See: https://bugs.debian.org/765782

        #

        # Self signed certs generated by the ssl-cert package

        # Don't use them in a production server!

        #

        # include snippets/snakeoil.conf;


        root /라라벨프로젝트명/public;


        # Add index.php to the list if you are using PHP

        index index.php index.html index.htm;

 server_name api;


        location / {

                # First attempt to serve request as file, then

                # as directory, then fall back to displaying a 404.

#               try_files $uri $uri/ =404;

                try_files $uri $uri/ /index.php?$query_string;

        }


        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

        #

        #location ~ \.php$ {

        #       include snippets/fastcgi-php.conf;

        #

        #       # With php7.0-cgi alone:

        #       fastcgi_pass 127.0.0.1:9000;

        #       # With php7.0-fpm:

        #       fastcgi_pass unix:/run/php/php7.0-fpm.sock;

        #}


        # deny access to .htaccess files, if Apache's document root

        # concurs with nginx's one

        #

        #location ~ /\.ht {

        #       deny all;

        #}


        location ~ \.php$ {

                try_files $uri =404;

                fastcgi_split_path_info ^(.+\.php)(/.+)$;

                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

                fastcgi_index index.php;

                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

                include fastcgi_params;

        }

}


service nginx restart

service php7.2-fpm restart




'프로그래밍 > PHP' 카테고리의 다른 글

Malformed UTF-8 characters, possibly incorrectly encoded  (0) 2018.03.15
ssh에서 git password 한번만 입력하게 하기  (0) 2018.03.09
우분투 php 최신버전으로 설치후 셋팅  (0) 2018.02.05
ubuntu 16.04 에서 php7.2설치하기  (0) 2018.02.04
맥 php 최신버전으로 업데이트  (0) 2017.09.26
Posted by ㅇ_ㅎ
현재 브라우저에서는 댓글을 표시할 수 없습니다.
IE9 이상으로 브라우저를 업그레이드하거나, 크롬, 파이어폭스 등 최신 브라우저를 이용해주세요.
블로그 이미지

즐기자...

by ㅇ_ㅎ

공지사항

태그

두릅 카레돈까스 점심

최근에 올라온 글

  • 더 보기

최근 댓글

최근에 받은 트랙백

글 보관함

달력

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

링크

카운터

Total
Today
Yesterday
방명록 : 관리자 : 글쓰기
ㅇ_ㅎ's Blog is powered by daumkakao
Skin ⓘ material T Mark1 by 뭐하라

ⓒ 2015. ㅇ_ㅎ all rights reserved.

favicon

낄롱의 블로그

즐기자...

  • 태그
  • 링크 추가
  • 방명록

관리자 메뉴

  • 관리자 모드
  • 글쓰기
  • 분류 전체보기 (215)
    • 프로그래밍 (148)
      • Android (72)
      • Swift (5)
      • IOS (1)
      • PHP (21)
      • Server (9)
      • Python (10)
      • HTML (1)
      • CSS (1)
      • Javascript (7)
      • MySQL (9)
      • MSSQL (4)
      • Unity (7)
    • 식샤를 합시다 (43)
    • 기타 (22)

카테고리

PC화면 보기 티스토리 Daum

티스토리툴바