개발/aws
[설정 및 설치]3. Ubuntu 22.04 LTS에 Nginx 설치
적아38
2022. 5. 20. 14:37
728x90
※ nginx 설치
1. Ubuntu 업데이트
sudo apt update && sudo apt upgrade
2. Nginx 설치
sudo apt install nginx -y
3. 원하는 사용자를 위해 nginx 전체 Nginx를 설치
sudo apt install nginx nginx-full -y
4. nginx-extra 모듈을 설치
sudo apt install nginx-extras -y
5. 설치 확인
systemctl status nginx
6. Nginx 서비스 활성화
sudo systemctl enable nginx --now
sudo apt update && sudo apt upgrade
sudo apt install nginx -y
sudo apt install nginx nginx-full -y
sudo apt install nginx-extras -y
systemctl status nginx
sudo systemctl enable nginx --now
※ UFW 구성 (기본 방화벽 포트 설정)
1. ufw 확인
sudo apt install ufw -y
2. ufw 사용
sudo ufw enable
3. 현재 사용가능한 서비스별 ufw 설정값들을 확인
sudo ufw app list
4. 허용
sudo ufw allow 'Nginx HTTP' /*80*/
sudo ufw allow 'Nginx HTTPS' /*433*/
sudo ufw allow 'Nginx FULL' /*모두*/
sudo ufw allow 22
sudo apt install ufw -y
sudo ufw enable
sudo ufw app list
sudo ufw allow 'Nginx HTTP'
sudo ufw allow 'Nginx HTTPS'
sudo ufw allow 'Nginx FULL'
sudo ufw allow 22
728x90