답변 2개
1.Nginx 설치하기:
아래 명령어를 사용하여 Nginx를 설치합니다.
sudo apt update
sudo apt install nginx
설치가 완료되면 Nginx 서비스가 실행 중인지 확인합니다.
sudo systemctl status nginx
2.PHP-FPM 설치하기:
아래 명령어를 사용하여 PHP 및 관련 모듈을 설치합니다.
sudo apt install php-fpm php-mysql php-common php-gd php-json php-cli php-mbstring php-opcache php-readline
설치가 완료되면 PHP-FPM 서비스가 실행 중인지 확인합니다.
sudo systemctl status php7.4-fpm
3.MariaDB 설치하기:
아래 명령어를 사용하여 MariaDB를 설치합니다.
sudo apt install mariadb-server
설치 중에 root 암호를 설정해야 합니다. 설정을 따라 진행하고 암호를 입력합니다.
설치가 완료되면 MariaDB 서비스가 실행 중인지 확인합니다.
sudo systemctl status mariadb
4.추가 구성:
Nginx의 기본 설정 파일(/etc/nginx/sites-available/default)을 편집하여 PHP-FPM과 연동합니다. 다음과 같이 설정합니다:
server {
...
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
...
}
설정 변경 후 Nginx 서비스를 다시 시작합니다.
sudo systemctl restart nginx
댓글을 작성하려면 로그인이 필요합니다.
우성짱님 사이트 참고하세요.
아주 세세하게 잘 설명되어있어요.
https://www.wsgvet.com
https://blog.wsgvet.com
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인