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 |
IE9 이상으로 브라우저를 업그레이드하거나, 크롬, 파이어폭스 등 최신 브라우저를 이용해주세요.